@@ -6,15 +6,14 @@ used here with the memory controller that is used in hardware.
66
77Salient features
88
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.
1011b. The infrastructure allows easy addition of other types of memory to control
1112c. Provides *zero overhead* for non memory controller users
1213d. Provides a double LRU: global memory pressure causes reclaim from the
1314 global LRU; a cgroup on hitting a limit, reclaims from the per
1415 cgroup LRU
1516
16- NOTE: Swap Cache (unmapped) is not accounted now.
17-
1817Benefits and Purpose of the memory controller
1918
2019The memory controller isolates the memory behaviour of a group of tasks
@@ -290,34 +289,44 @@ will be charged as a new owner of it.
290289 moved to the parent. If you want to avoid that, force_empty will be useful.
291290
2922915.2 stat file
293- memory.stat file includes following statistics (now)
294- cache - # of pages from page-cache and shmem.
295- rss - # of pages from anonymous memory.
296- pgpgin - # of event of charging
297- pgpgout - # of event of uncharging
298- active_anon - # of pages on active lru of anon, shmem.
299- inactive_anon - # of pages on active lru of anon, shmem
300- active_file - # of pages on active lru of file-cache
301- inactive_file - # of pages on inactive lru of file cache
302- unevictable - # of pages cannot be reclaimed.(mlocked etc)
303-
304- Below is depend on CONFIG_DEBUG_VM.
305- inactive_ratio - VM internal parameter. (see mm/page_alloc.c)
306- recent_rotated_anon - VM internal parameter. (see mm/vmscan.c)
307- recent_rotated_file - VM internal parameter. (see mm/vmscan.c)
308- recent_scanned_anon - VM internal parameter. (see mm/vmscan.c)
309- recent_scanned_file - VM internal parameter. (see mm/vmscan.c)
310-
311- Memo:
292+
293+ memory.stat file includes following statistics
294+
295+ cache - # of bytes of page cache memory.
296+ rss - # of bytes of anonymous and swap cache memory.
297+ pgpgin - # of pages paged in (equivalent to # of charging events).
298+ pgpgout - # of pages paged out (equivalent to # of uncharging events).
299+ active_anon - # of bytes of anonymous and swap cache memory on active
300+ lru list.
301+ inactive_anon - # of bytes of anonymous memory and swap cache memory on
302+ inactive lru list.
303+ active_file - # of bytes of file-backed memory on active lru list.
304+ inactive_file - # of bytes of file-backed memory on inactive lru list.
305+ unevictable - # of bytes of memory that cannot be reclaimed (mlocked etc).
306+
307+ The following additional stats are dependent on CONFIG_DEBUG_VM.
308+
309+ inactive_ratio - VM internal parameter. (see mm/page_alloc.c)
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:
312316 recent_rotated means recent frequency of lru rotation.
313317 recent_scanned means recent # of scans to lru.
314318 showing for better debug please see the code for meanings.
315319
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.
316325
3173265.3 swappiness
318327 Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only.
319328
320- Following cgroup's swapiness can't be changed.
329+ Following cgroups' swapiness can't be changed.
321330 - root cgroup (uses /proc/sys/vm/swappiness).
322331 - a cgroup which uses hierarchy and it has child cgroup.
323332 - a cgroup which uses hierarchy and not the root of hierarchy.
0 commit comments