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.
258 **What happens when a cgroup hits memory.memsw.limit_in_bytes**
260 When a cgroup hits memory.memsw.limit_in_bytes, it's useless to do swap-out
261 in this cgroup. Then, swap-out will not be done by cgroup routine and file
264 it by cgroup.
269 Each cgroup maintains a per cgroup LRU which has the same structure as
270 global VM. When a cgroup goes over its limit, we first try
271 to reclaim memory from the cgroup so as to make space for the new
272 pages that the cgroup has touched. If the reclaim is unsuccessful,
274 cgroup. (See 10. OOM Control below.)
277 pages that are selected for reclaiming come from the per-cgroup LRU
281 Reclaim does not work for the root cgroup, since we cannot set any
282 limits on the root cgroup.
305 per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by
317 it can be disabled system-wide by passing cgroup.memory=nokmem to the kernel
320 Kernel memory limits are not imposed for the root cgroup. Usage for the root
321 cgroup may or may not be accounted. The memory used is accumulated into
350 per cgroup, instead of globally.
369 deployments where the total amount of memory per-cgroup is overcommited.
378 triggered for a cgroup when it hits K while staying below U, which makes
383 triggered for the cgroup for both kinds of memory. This setup gives the
403 # mount -t tmpfs none /sys/fs/cgroup
404 # mkdir /sys/fs/cgroup/memory
405 # mount -t cgroup none /sys/fs/cgroup/memory -o memory
409 # mkdir /sys/fs/cgroup/memory/0
410 # echo $$ > /sys/fs/cgroup/memory/0/tasks
412 Since now we're in the 0 cgroup, we can alter the memory limit::
414 # echo 4M > /sys/fs/cgroup/memory/0/memory.limit_in_bytes
425 We cannot set limits on the root cgroup any more.
429 # cat /sys/fs/cgroup/memory/0/memory.limit_in_bytes
434 # cat /sys/fs/cgroup/memory/0/memory.usage_in_bytes
447 The memory.failcnt field gives the number of times that the cgroup limit was
472 Sometimes a user might find that the application under a cgroup is
475 1. The cgroup limit is too low (just too low to do anything useful)
479 some of the pages cached in the cgroup (page cache pages).
487 When a task migrates from one cgroup to another, its charge is not
488 carried forward by default. The pages allocated from the original cgroup still
495 4.3 Removing a cgroup
498 A cgroup can be removed by rmdir, but as discussed in sections 4.1 and 4.2, a
499 cgroup might have some charge associated with it, even though all
507 Charges recorded in swap information is not updated at removal of cgroup.
508 Recorded information is discarded and a cgroup which uses swap (swapcache)
518 memory.force_empty interface is provided to make cgroup's memory usage empty.
523 the cgroup will be reclaimed and as many pages reclaimed as possible.
542 per-memory cgroup local status
551 pgpgin # of charging events to the memory cgroup. The charging
553 anon page(RSS) or cache page(Page Cache) to the cgroup.
554 pgpgout # of uncharging events to the memory cgroup. The uncharging
555 event happens each time a page is unaccounted from the cgroup.
574 under which the memory cgroup is
576 hierarchy under which memory cgroup is.
579 addition to the cgroup's own value includes the
602 amount of physical memory used by the cgroup.
604 'rss + mapped_file" will give you resident set size of cgroup.
607 mapped_file is accounted only when the memory cgroup is owner of page
614 in the root cgroup corresponds to the global swappiness setting.
624 A memory cgroup provides memory.failcnt and memory.memsw.failcnt files.
626 hit its limit. When a memory cgroup hits a limit, failcnt increases and
636 For efficiency, as other kernel components, memory cgroup uses some optimization
671 cgroup filesystem. Consider for example, the following cgroup filesystem
691 A memory cgroup by default disables the hierarchy feature. Support
692 can be enabled by writing 1 to memory.use_hierarchy file of the root cgroup::
701 Enabling/disabling will fail if either the cgroup already has other
702 cgroups created below it, or if the parent cgroup has use_hierarchy
707 case of an OOM event in any cgroup.
752 is, uncharge task's pages from the old cgroup and charge them to the new cgroup.
760 writing to memory.move_charge_at_immigrate of the destination cgroup.
773 If we cannot find enough space for the task in the destination cgroup, we
789 (old) memory cgroup.
816 Memory cgroup implements memory thresholds using the cgroups notification
825 cgroup.event_control.
830 It's applicable for root and non-root cgroup.
837 Memory cgroup implements OOM notifier using the cgroup notification
846 cgroup.event_control
849 OOM notification doesn't work for the root cgroup.
855 If OOM-killer is disabled, tasks under cgroup will hang/sleep
856 in memory cgroup's OOM-waitqueue when they request accountable memory.
858 For running them, you have to relax the memory cgroup's OOM status by
875 (if 1, the memory cgroup is under OOM, tasks may be stopped.)
943 to cgroup.event_control.
951 Here is a small script example that makes a new cgroup, sets up a
952 memory limit, sets up a notification in the cgroup and then makes child
953 cgroup experience a critical pressure::
955 # cd /sys/fs/cgroup/memory/
970 1. Make per-cgroup scanner reclaim not-shared pages first