Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143252
b: refs/heads/master
c: 17a7b7b
h: refs/heads/master
v: v3
  • Loading branch information
Tetsuo Handa authored and James Morris committed Apr 13, 2009
1 parent c355c2b commit 40ce65d
Show file tree
Hide file tree
Showing 107 changed files with 1,702 additions and 2,600 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c98aa7424ff163637d8321674ec58dee28152d4
refs/heads/master: 17a7b7b39056a82c5012539311850f202e6c3cd4
6 changes: 3 additions & 3 deletions trunk/Documentation/ABI/testing/debugfs-pktcdvd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
What: /sys/kernel/debug/pktcdvd/pktcdvd[0-7]
What: /debug/pktcdvd/pktcdvd[0-7]
Date: Oct. 2006
KernelVersion: 2.6.20
Contact: Thomas Maier <balagi@justmail.de>
Expand All @@ -10,10 +10,10 @@ debugfs interface
The pktcdvd module (packet writing driver) creates
these files in debugfs:

/sys/kernel/debug/pktcdvd/pktcdvd[0-7]/
/debug/pktcdvd/pktcdvd[0-7]/
info (0444) Lots of driver statistics and infos.

Example:
-------

cat /sys/kernel/debug/pktcdvd/pktcdvd0/info
cat /debug/pktcdvd/pktcdvd0/info
55 changes: 23 additions & 32 deletions trunk/Documentation/cgroups/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ used here with the memory controller that is used in hardware.

Salient features

a. Enable control of Anonymous, Page Cache (mapped and unmapped) and
Swap Cache memory pages.
a. Enable control of both RSS (mapped) and Page Cache (unmapped) pages
b. The infrastructure allows easy addition of other types of memory to control
c. Provides *zero overhead* for non memory controller users
d. Provides a double LRU: global memory pressure causes reclaim from the
global LRU; a cgroup on hitting a limit, reclaims from the per
cgroup LRU

NOTE: Swap Cache (unmapped) is not accounted now.

Benefits and Purpose of the memory controller

The memory controller isolates the memory behaviour of a group of tasks
Expand Down Expand Up @@ -289,44 +290,34 @@ will be charged as a new owner of it.
moved to the parent. If you want to avoid that, force_empty will be useful.

5.2 stat file

memory.stat file includes following statistics

cache - # of bytes of page cache memory.
rss - # of bytes of anonymous and swap cache memory.
pgpgin - # of pages paged in (equivalent to # of charging events).
pgpgout - # of pages paged out (equivalent to # of uncharging events).
active_anon - # of bytes of anonymous and swap cache memory on active
lru list.
inactive_anon - # of bytes of anonymous memory and swap cache memory on
inactive lru list.
active_file - # of bytes of file-backed memory on active lru list.
inactive_file - # of bytes of file-backed memory on inactive lru list.
unevictable - # of bytes of memory that cannot be reclaimed (mlocked etc).

The following additional stats are dependent on CONFIG_DEBUG_VM.

inactive_ratio - VM internal parameter. (see mm/page_alloc.c)
recent_rotated_anon - VM internal parameter. (see mm/vmscan.c)
recent_rotated_file - VM internal parameter. (see mm/vmscan.c)
recent_scanned_anon - VM internal parameter. (see mm/vmscan.c)
recent_scanned_file - VM internal parameter. (see mm/vmscan.c)

Memo:
memory.stat file includes following statistics (now)
cache - # of pages from page-cache and shmem.
rss - # of pages from anonymous memory.
pgpgin - # of event of charging
pgpgout - # of event of uncharging
active_anon - # of pages on active lru of anon, shmem.
inactive_anon - # of pages on active lru of anon, shmem
active_file - # of pages on active lru of file-cache
inactive_file - # of pages on inactive lru of file cache
unevictable - # of pages cannot be reclaimed.(mlocked etc)

Below is depend on CONFIG_DEBUG_VM.
inactive_ratio - VM internal parameter. (see mm/page_alloc.c)
recent_rotated_anon - VM internal parameter. (see mm/vmscan.c)
recent_rotated_file - VM internal parameter. (see mm/vmscan.c)
recent_scanned_anon - VM internal parameter. (see mm/vmscan.c)
recent_scanned_file - VM internal parameter. (see mm/vmscan.c)

Memo:
recent_rotated means recent frequency of lru rotation.
recent_scanned means recent # of scans to lru.
showing for better debug please see the code for meanings.

Note:
Only anonymous and swap cache memory is listed as part of 'rss' stat.
This should not be confused with the true 'resident set size' or the
amount of physical memory used by the cgroup. Per-cgroup rss
accounting is not done yet.

5.3 swappiness
Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only.

Following cgroups' swapiness can't be changed.
Following cgroup's swapiness can't be changed.
- root cgroup (uses /proc/sys/vm/swappiness).
- a cgroup which uses hierarchy and it has child cgroup.
- a cgroup which uses hierarchy and not the root of hierarchy.
Expand Down
27 changes: 6 additions & 21 deletions trunk/Documentation/cgroups/resource_counter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,13 @@ to work with it.

2. Basic accounting routines

a. void res_counter_init(struct res_counter *rc,
struct res_counter *rc_parent)
a. void res_counter_init(struct res_counter *rc)

Initializes the resource counter. As usual, should be the first
routine called for a new counter.

The struct res_counter *parent can be used to define a hierarchical
child -> parent relationship directly in the res_counter structure,
NULL can be used to define no relationship.

c. int res_counter_charge(struct res_counter *rc, unsigned long val,
struct res_counter **limit_fail_at)
b. int res_counter_charge[_locked]
(struct res_counter *rc, unsigned long val)

When a resource is about to be allocated it has to be accounted
with the appropriate resource counter (controller should determine
Expand All @@ -72,25 +67,15 @@ to work with it.
* if the charging is performed first, then it should be uncharged
on error path (if the one is called).

If the charging fails and a hierarchical dependency exists, the
limit_fail_at parameter is set to the particular res_counter element
where the charging failed.

d. int res_counter_charge_locked
(struct res_counter *rc, unsigned long val)

The same as res_counter_charge(), but it must not acquire/release the
res_counter->lock internally (it must be called with res_counter->lock
held).

e. void res_counter_uncharge[_locked]
c. void res_counter_uncharge[_locked]
(struct res_counter *rc, unsigned long val)

When a resource is released (freed) it should be de-accounted
from the resource counter it was accounted to. This is called
"uncharging".

The _locked routines imply that the res_counter->lock is taken.
The _locked routines imply that the res_counter->lock is taken.


2.1 Other accounting routines

Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/sysctl/net.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ of struct cmsghdr structures with appended data.

There is only one file in this directory.
unix_dgram_qlen limits the max number of datagrams queued in Unix domain
socket's buffer. It will not take effect unless PF_UNIX flag is specified.
socket's buffer. It will not take effect unless PF_UNIX flag is spicified.


3. /proc/sys/net/ipv4 - IPV4 settings
Expand Down
55 changes: 55 additions & 0 deletions trunk/Documentation/tomoyo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
--- What is TOMOYO? ---

TOMOYO is a name-based MAC extension (LSM module) for the Linux kernel.

LiveCD-based tutorials are available at
http://tomoyo.sourceforge.jp/en/1.6.x/1st-step/ubuntu8.04-live/
http://tomoyo.sourceforge.jp/en/1.6.x/1st-step/centos5-live/ .
Though these tutorials use non-LSM version of TOMOYO, they are useful for you
to know what TOMOYO is.

--- How to enable TOMOYO? ---

Build the kernel with CONFIG_SECURITY_TOMOYO=y and pass "security=tomoyo" on
kernel's command line.

Please see http://tomoyo.sourceforge.jp/en/2.2.x/ for details.

--- Where is documentation? ---

User <-> Kernel interface documentation is available at
http://tomoyo.sourceforge.jp/en/2.2.x/policy-reference.html .

Materials we prepared for seminars and symposiums are available at
http://sourceforge.jp/projects/tomoyo/docs/?category_id=532&language_id=1 .
Below lists are chosen from three aspects.

What is TOMOYO?
TOMOYO Linux Overview
http://sourceforge.jp/projects/tomoyo/docs/lca2009-takeda.pdf
TOMOYO Linux: pragmatic and manageable security for Linux
http://sourceforge.jp/projects/tomoyo/docs/freedomhectaipei-tomoyo.pdf
TOMOYO Linux: A Practical Method to Understand and Protect Your Own Linux Box
http://sourceforge.jp/projects/tomoyo/docs/PacSec2007-en-no-demo.pdf

What can TOMOYO do?
Deep inside TOMOYO Linux
http://sourceforge.jp/projects/tomoyo/docs/lca2009-kumaneko.pdf
The role of "pathname based access control" in security.
http://sourceforge.jp/projects/tomoyo/docs/lfj2008-bof.pdf

History of TOMOYO?
Realities of Mainlining
http://sourceforge.jp/projects/tomoyo/docs/lfj2008.pdf

--- What is future plan? ---

We believe that inode based security and name based security are complementary
and both should be used together. But unfortunately, so far, we cannot enable
multiple LSM modules at the same time. We feel sorry that you have to give up
SELinux/SMACK/AppArmor etc. when you want to use TOMOYO.

We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM
version of TOMOYO, available at http://tomoyo.sourceforge.jp/en/1.6.x/ .
LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning
to port non-LSM version's functionalities to LSM versions.
2 changes: 0 additions & 2 deletions trunk/Documentation/vm/00-INDEX
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
00-INDEX
- this file.
active_mm.txt
- An explanation from Linus about tsk->active_mm vs tsk->mm.
balance
- various information on memory balancing.
hugetlbpage.txt
Expand Down
83 changes: 0 additions & 83 deletions trunk/Documentation/vm/active_mm.txt

This file was deleted.

Loading

0 comments on commit 40ce65d

Please sign in to comment.