Lines Matching refs:cgroup
17 When we mention a cgroup (cgroupfs's directory) with memory controller,
18 we call it "memory cgroup". When you see git-log and source code, you'll
32 b. Create a cgroup with a limited amount of memory; this can be used
55 - Root cgroup has no limit controls.
65 cgroup.procs show list of processes
66 cgroup.event_control an interface for event_fd()
142 processes associated with the controller. Each cgroup has a memory controller
173 1. Accounting happens per cgroup
174 2. Each mm_struct knows about which cgroup it belongs to
176 cgroup it belongs to
179 set up the necessary data structures and check if the cgroup that is being
180 charged is over its limit. If it is, then reclaim is invoked on the cgroup.
183 updated. page_cgroup has its own LRU on cgroup.
217 cgroup that first touches a page is accounted for the page. The principle
218 behind this approach is that a cgroup that aggressively uses a shared
220 the cgroup that brought it in -- this will happen on memory pressure).
222 But see section 8.2: when moving a task to another cgroup, its pages may
223 be recharged to the new cgroup, if move_charge_at_immigrate has been chosen.
228 Swap usage is always recorded for each of cgroup. Swap Extension allows you to
253 **What happens when a cgroup hits memory.memsw.limit_in_bytes**
255 When a cgroup hits memory.memsw.limit_in_bytes, it's useless to do swap-out
256 in this cgroup. Then, swap-out will not be done by cgroup routine and file
259 it by cgroup.
264 Each cgroup maintains a per cgroup LRU which has the same structure as
265 global VM. When a cgroup goes over its limit, we first try
266 to reclaim memory from the cgroup so as to make space for the new
267 pages that the cgroup has touched. If the reclaim is unsuccessful,
269 cgroup. (See 10. OOM Control below.)
272 pages that are selected for reclaiming come from the per-cgroup LRU
276 Reclaim does not work for the root cgroup, since we cannot set any
277 limits on the root cgroup.
300 per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by
312 it can be disabled system-wide by passing cgroup.memory=nokmem to the kernel
315 Kernel memory limits are not imposed for the root cgroup. Usage for the root
316 cgroup may or may not be accounted. The memory used is accumulated into
345 per cgroup, instead of globally.
364 deployments where the total amount of memory per-cgroup is overcommited.
373 triggered for a cgroup when it hits K while staying below U, which makes
378 triggered for the cgroup for both kinds of memory. This setup gives the
398 # mount -t tmpfs none /sys/fs/cgroup
399 # mkdir /sys/fs/cgroup/memory
400 # mount -t cgroup none /sys/fs/cgroup/memory -o memory
404 # mkdir /sys/fs/cgroup/memory/0
405 # echo $$ > /sys/fs/cgroup/memory/0/tasks
407 Since now we're in the 0 cgroup, we can alter the memory limit::
409 # echo 4M > /sys/fs/cgroup/memory/0/memory.limit_in_bytes
420 We cannot set limits on the root cgroup any more.
424 # cat /sys/fs/cgroup/memory/0/memory.limit_in_bytes
429 # cat /sys/fs/cgroup/memory/0/memory.usage_in_bytes
442 The memory.failcnt field gives the number of times that the cgroup limit was
467 Sometimes a user might find that the application under a cgroup is
470 1. The cgroup limit is too low (just too low to do anything useful)
474 some of the pages cached in the cgroup (page cache pages).
482 When a task migrates from one cgroup to another, its charge is not
483 carried forward by default. The pages allocated from the original cgroup still
490 4.3 Removing a cgroup
493 A cgroup can be removed by rmdir, but as discussed in sections 4.1 and 4.2, a
494 cgroup might have some charge associated with it, even though all
502 Charges recorded in swap information is not updated at removal of cgroup.
503 Recorded information is discarded and a cgroup which uses swap (swapcache)
513 memory.force_empty interface is provided to make cgroup's memory usage empty.
518 the cgroup will be reclaimed and as many pages reclaimed as possible.
537 per-memory cgroup local status
546 pgpgin # of charging events to the memory cgroup. The charging
548 anon page(RSS) or cache page(Page Cache) to the cgroup.
549 pgpgout # of uncharging events to the memory cgroup. The uncharging
550 event happens each time a page is unaccounted from the cgroup.
569 under which the memory cgroup is
571 hierarchy under which memory cgroup is.
574 addition to the cgroup's own value includes the
597 amount of physical memory used by the cgroup.
599 'rss + mapped_file" will give you resident set size of cgroup.
602 mapped_file is accounted only when the memory cgroup is owner of page
609 in the root cgroup corresponds to the global swappiness setting.
619 A memory cgroup provides memory.failcnt and memory.memsw.failcnt files.
621 hit its limit. When a memory cgroup hits a limit, failcnt increases and
631 For efficiency, as other kernel components, memory cgroup uses some optimization
666 cgroup filesystem. Consider for example, the following cgroup filesystem
686 A memory cgroup by default disables the hierarchy feature. Support
687 can be enabled by writing 1 to memory.use_hierarchy file of the root cgroup::
696 Enabling/disabling will fail if either the cgroup already has other
697 cgroups created below it, or if the parent cgroup has use_hierarchy
702 case of an OOM event in any cgroup.
747 is, uncharge task's pages from the old cgroup and charge them to the new cgroup.
755 writing to memory.move_charge_at_immigrate of the destination cgroup.
768 If we cannot find enough space for the task in the destination cgroup, we
784 (old) memory cgroup.
811 Memory cgroup implements memory thresholds using the cgroups notification
820 cgroup.event_control.
825 It's applicable for root and non-root cgroup.
832 Memory cgroup implements OOM notifier using the cgroup notification
841 cgroup.event_control
844 OOM notification doesn't work for the root cgroup.
850 If OOM-killer is disabled, tasks under cgroup will hang/sleep
851 in memory cgroup's OOM-waitqueue when they request accountable memory.
853 For running them, you have to relax the memory cgroup's OOM status by
870 (if 1, the memory cgroup is under OOM, tasks may be stopped.)
938 to cgroup.event_control.
946 Here is a small script example that makes a new cgroup, sets up a
947 memory limit, sets up a notification in the cgroup and then makes child
948 cgroup experience a critical pressure::
950 # cd /sys/fs/cgroup/memory/
965 1. Make per-cgroup scanner reclaim not-shared pages first