aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2011-01-14 01:04:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-14 10:52:02 -0500
commit11ff26c884ec957bed87b49e3a38908f37d0d3e4 (patch)
tree056837fa144e1f8d1bd982a845cbe426626389ad /Documentation
parent52cfd503ad7176d23a5dd7af3981744feb60622f (diff)
revert documentaion update for memcg's dirty ratio.
Subjct: Revert memory cgroup dirty_ratio Documentation. The commit ece72400c2a27a3d726cb0854449f991d9fcd2da adds documentation for memcg's dirty ratio. But the function is not implemented yet. Remove the documentation for avoiding confusing users. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Greg Thelen <gthelen@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/cgroups/memory.txt74
1 files changed, 0 insertions, 74 deletions
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index bac328c232f5..7781857dc940 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -385,10 +385,6 @@ mapped_file - # of bytes of mapped file (includes tmpfs/shmem)
385pgpgin - # of pages paged in (equivalent to # of charging events). 385pgpgin - # of pages paged in (equivalent to # of charging events).
386pgpgout - # of pages paged out (equivalent to # of uncharging events). 386pgpgout - # of pages paged out (equivalent to # of uncharging events).
387swap - # of bytes of swap usage 387swap - # of bytes of swap usage
388dirty - # of bytes that are waiting to get written back to the disk.
389writeback - # of bytes that are actively being written back to the disk.
390nfs_unstable - # of bytes sent to the NFS server, but not yet committed to
391 the actual storage.
392inactive_anon - # of bytes of anonymous memory and swap cache memory on 388inactive_anon - # of bytes of anonymous memory and swap cache memory on
393 LRU list. 389 LRU list.
394active_anon - # of bytes of anonymous and swap cache memory on active 390active_anon - # of bytes of anonymous and swap cache memory on active
@@ -410,9 +406,6 @@ total_mapped_file - sum of all children's "cache"
410total_pgpgin - sum of all children's "pgpgin" 406total_pgpgin - sum of all children's "pgpgin"
411total_pgpgout - sum of all children's "pgpgout" 407total_pgpgout - sum of all children's "pgpgout"
412total_swap - sum of all children's "swap" 408total_swap - sum of all children's "swap"
413total_dirty - sum of all children's "dirty"
414total_writeback - sum of all children's "writeback"
415total_nfs_unstable - sum of all children's "nfs_unstable"
416total_inactive_anon - sum of all children's "inactive_anon" 409total_inactive_anon - sum of all children's "inactive_anon"
417total_active_anon - sum of all children's "active_anon" 410total_active_anon - sum of all children's "active_anon"
418total_inactive_file - sum of all children's "inactive_file" 411total_inactive_file - sum of all children's "inactive_file"
@@ -460,73 +453,6 @@ memory under it will be reclaimed.
460You can reset failcnt by writing 0 to failcnt file. 453You can reset failcnt by writing 0 to failcnt file.
461# echo 0 > .../memory.failcnt 454# echo 0 > .../memory.failcnt
462 455
4635.5 dirty memory
464
465Control the maximum amount of dirty pages a cgroup can have at any given time.
466
467Limiting dirty memory is like fixing the max amount of dirty (hard to reclaim)
468page cache used by a cgroup. So, in case of multiple cgroup writers, they will
469not be able to consume more than their designated share of dirty pages and will
470be forced to perform write-out if they cross that limit.
471
472The interface is equivalent to the procfs interface: /proc/sys/vm/dirty_*. It
473is possible to configure a limit to trigger both a direct writeback or a
474background writeback performed by per-bdi flusher threads. The root cgroup
475memory.dirty_* control files are read-only and match the contents of
476the /proc/sys/vm/dirty_* files.
477
478Per-cgroup dirty limits can be set using the following files in the cgroupfs:
479
480- memory.dirty_ratio: the amount of dirty memory (expressed as a percentage of
481 cgroup memory) at which a process generating dirty pages will itself start
482 writing out dirty data.
483
484- memory.dirty_limit_in_bytes: the amount of dirty memory (expressed in bytes)
485 in the cgroup at which a process generating dirty pages will start itself
486 writing out dirty data. Suffix (k, K, m, M, g, or G) can be used to indicate
487 that value is kilo, mega or gigabytes.
488
489 Note: memory.dirty_limit_in_bytes is the counterpart of memory.dirty_ratio.
490 Only one of them may be specified at a time. When one is written it is
491 immediately taken into account to evaluate the dirty memory limits and the
492 other appears as 0 when read.
493
494- memory.dirty_background_ratio: the amount of dirty memory of the cgroup
495 (expressed as a percentage of cgroup memory) at which background writeback
496 kernel threads will start writing out dirty data.
497
498- memory.dirty_background_limit_in_bytes: the amount of dirty memory (expressed
499 in bytes) in the cgroup at which background writeback kernel threads will
500 start writing out dirty data. Suffix (k, K, m, M, g, or G) can be used to
501 indicate that value is kilo, mega or gigabytes.
502
503 Note: memory.dirty_background_limit_in_bytes is the counterpart of
504 memory.dirty_background_ratio. Only one of them may be specified at a time.
505 When one is written it is immediately taken into account to evaluate the dirty
506 memory limits and the other appears as 0 when read.
507
508A cgroup may contain more dirty memory than its dirty limit. This is possible
509because of the principle that the first cgroup to touch a page is charged for
510it. Subsequent page counting events (dirty, writeback, nfs_unstable) are also
511counted to the originally charged cgroup.
512
513Example: If page is allocated by a cgroup A task, then the page is charged to
514cgroup A. If the page is later dirtied by a task in cgroup B, then the cgroup A
515dirty count will be incremented. If cgroup A is over its dirty limit but cgroup
516B is not, then dirtying a cgroup A page from a cgroup B task may push cgroup A
517over its dirty limit without throttling the dirtying cgroup B task.
518
519When use_hierarchy=0, each cgroup has dirty memory usage and limits.
520System-wide dirty limits are also consulted. Dirty memory consumption is
521checked against both system-wide and per-cgroup dirty limits.
522
523The current implementation does not enforce per-cgroup dirty limits when
524use_hierarchy=1. System-wide dirty limits are used for processes in such
525cgroups. Attempts to read memory.dirty_* files return the system-wide
526values. Writes to the memory.dirty_* files return error. An enhanced
527implementation is needed to check the chain of parents to ensure that no
528dirty limit is exceeded.
529
5306. Hierarchy support 4566. Hierarchy support
531 457
532The memory controller supports a deep hierarchy and hierarchical accounting. 458The memory controller supports a deep hierarchy and hierarchical accounting.