diff options
author | Bharata B Rao <bharata@linux.vnet.ibm.com> | 2009-04-13 17:40:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-13 18:04:33 -0400 |
commit | c863d835b7cd9a3c08a941d4ae59b8faefa31422 (patch) | |
tree | 7adaf842da7d85ec63ff633ab21327e4edce1936 /Documentation | |
parent | e930438c42e744ef1f8bfdbb338253c9f384df42 (diff) |
memcg: fix documentation
The description about various statistics from memory.stat is not accurate
and confusing at times.
Correct this along with a few other minor cleanups.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/cgroups/memory.txt | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index a98a7fe7aabb..1a608877b14e 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -6,15 +6,14 @@ used here with the memory controller that is used in hardware. | |||
6 | 6 | ||
7 | Salient features | 7 | Salient features |
8 | 8 | ||
9 | a. Enable control of both RSS (mapped) and Page Cache (unmapped) pages | 9 | a. Enable control of Anonymous, Page Cache (mapped and unmapped) and |
10 | Swap Cache memory pages. | ||
10 | b. The infrastructure allows easy addition of other types of memory to control | 11 | b. The infrastructure allows easy addition of other types of memory to control |
11 | c. Provides *zero overhead* for non memory controller users | 12 | c. Provides *zero overhead* for non memory controller users |
12 | d. Provides a double LRU: global memory pressure causes reclaim from the | 13 | d. Provides a double LRU: global memory pressure causes reclaim from the |
13 | global LRU; a cgroup on hitting a limit, reclaims from the per | 14 | global LRU; a cgroup on hitting a limit, reclaims from the per |
14 | cgroup LRU | 15 | cgroup LRU |
15 | 16 | ||
16 | NOTE: Swap Cache (unmapped) is not accounted now. | ||
17 | |||
18 | Benefits and Purpose of the memory controller | 17 | Benefits and Purpose of the memory controller |
19 | 18 | ||
20 | The memory controller isolates the memory behaviour of a group of tasks | 19 | The memory controller isolates the memory behaviour of a group of tasks |
@@ -290,34 +289,44 @@ will be charged as a new owner of it. | |||
290 | moved to the parent. If you want to avoid that, force_empty will be useful. | 289 | moved to the parent. If you want to avoid that, force_empty will be useful. |
291 | 290 | ||
292 | 5.2 stat file | 291 | 5.2 stat file |
293 | memory.stat file includes following statistics (now) | 292 | |
294 | cache - # of pages from page-cache and shmem. | 293 | memory.stat file includes following statistics |
295 | rss - # of pages from anonymous memory. | 294 | |
296 | pgpgin - # of event of charging | 295 | cache - # of bytes of page cache memory. |
297 | pgpgout - # of event of uncharging | 296 | rss - # of bytes of anonymous and swap cache memory. |
298 | active_anon - # of pages on active lru of anon, shmem. | 297 | pgpgin - # of pages paged in (equivalent to # of charging events). |
299 | inactive_anon - # of pages on active lru of anon, shmem | 298 | pgpgout - # of pages paged out (equivalent to # of uncharging events). |
300 | active_file - # of pages on active lru of file-cache | 299 | active_anon - # of bytes of anonymous and swap cache memory on active |
301 | inactive_file - # of pages on inactive lru of file cache | 300 | lru list. |
302 | unevictable - # of pages cannot be reclaimed.(mlocked etc) | 301 | inactive_anon - # of bytes of anonymous memory and swap cache memory on |
303 | 302 | inactive lru list. | |
304 | Below is depend on CONFIG_DEBUG_VM. | 303 | active_file - # of bytes of file-backed memory on active lru list. |
305 | inactive_ratio - VM internal parameter. (see mm/page_alloc.c) | 304 | inactive_file - # of bytes of file-backed memory on inactive lru list. |
306 | recent_rotated_anon - VM internal parameter. (see mm/vmscan.c) | 305 | unevictable - # of bytes of memory that cannot be reclaimed (mlocked etc). |
307 | recent_rotated_file - VM internal parameter. (see mm/vmscan.c) | 306 | |
308 | recent_scanned_anon - VM internal parameter. (see mm/vmscan.c) | 307 | The following additional stats are dependent on CONFIG_DEBUG_VM. |
309 | recent_scanned_file - VM internal parameter. (see mm/vmscan.c) | 308 | |
310 | 309 | inactive_ratio - VM internal parameter. (see mm/page_alloc.c) | |
311 | Memo: | 310 | recent_rotated_anon - VM internal parameter. (see mm/vmscan.c) |
311 | recent_rotated_file - VM internal parameter. (see mm/vmscan.c) | ||
312 | recent_scanned_anon - VM internal parameter. (see mm/vmscan.c) | ||
313 | recent_scanned_file - VM internal parameter. (see mm/vmscan.c) | ||
314 | |||
315 | Memo: | ||
312 | recent_rotated means recent frequency of lru rotation. | 316 | recent_rotated means recent frequency of lru rotation. |
313 | recent_scanned means recent # of scans to lru. | 317 | recent_scanned means recent # of scans to lru. |
314 | showing for better debug please see the code for meanings. | 318 | showing for better debug please see the code for meanings. |
315 | 319 | ||
320 | Note: | ||
321 | Only anonymous and swap cache memory is listed as part of 'rss' stat. | ||
322 | This should not be confused with the true 'resident set size' or the | ||
323 | amount of physical memory used by the cgroup. Per-cgroup rss | ||
324 | accounting is not done yet. | ||
316 | 325 | ||
317 | 5.3 swappiness | 326 | 5.3 swappiness |
318 | Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. | 327 | Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. |
319 | 328 | ||
320 | Following cgroup's swapiness can't be changed. | 329 | Following cgroups' swapiness can't be changed. |
321 | - root cgroup (uses /proc/sys/vm/swappiness). | 330 | - root cgroup (uses /proc/sys/vm/swappiness). |
322 | - a cgroup which uses hierarchy and it has child cgroup. | 331 | - a cgroup which uses hierarchy and it has child cgroup. |
323 | - a cgroup which uses hierarchy and not the root of hierarchy. | 332 | - a cgroup which uses hierarchy and not the root of hierarchy. |