Lines Matching +full:deep +full:- +full:touch
18 we call it "memory cgroup". When you see git-log and source code, you'll
30 Memory-hungry applications can be isolated and limited to a smaller
42 Current Status: linux-2.6.34-mmotm(development version of 2010/April)
46 - accounting anonymous pages, file caches, swap caches usage and limiting them.
47 - pages are linked to per-memcg LRU exclusively, and there is no global LRU.
48 - optionally, memory+swap usage can be accounted and limited.
49 - hierarchical accounting
50 - soft limit
51 - moving (recharging) account at moving a task is selectable.
52 - usage threshold notifier
53 - memory pressure notifier
54 - oom-killer disable knob and oom-notifier
55 - Root cgroup has no limit controls.
138 -----------
146 ---------------
150 +--------------------+
153 +--------------------+
156 +---------------+ | +---------------+
159 +---------------+ | +---------------+
161 + --------------+
163 +---------------+ +------+--------+
164 | page +----------> page_cgroup|
166 +---------------+ +---------------+
182 If everything goes well, a page meta-data-structure called page_cgroup is
184 (*) page_cgroup structure is allocated at boot/memory-hotplug time.
187 ------------------------
195 inserted into inode (radix-tree). While it's mapped into the page tables of
199 unaccounted when it's removed from radix-tree. Even if RSS pages are fully
202 A swapped-in page is accounted after adding into swapcache.
204 Note: The kernel does swapin-readahead and reads multiple swaps at once.
210 Note: we just account pages-on-LRU because our purpose is to control amount
211 of used pages; not-on-LRU pages tend to be out-of-control from VM view.
214 --------------------------
216 Shared pages are accounted on the basis of the first touch approach. The
220 the cgroup that brought it in -- this will happen on memory pressure).
226 --------------------------------------
233 - memory.memsw.usage_in_bytes.
234 - memory.memsw.limit_in_bytes.
247 The global LRU(kswapd) can swap out arbitrary pages. Swap-out means
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
262 -----------
272 pages that are selected for reclaiming come from the per-cgroup LRU
286 -----------
294 mm->page_table_lock
295 pgdat->lru_lock
300 per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by
301 pgdat->lru_lock, it has no lock of its own.
304 -----------------------------------------------
312 it can be disabled system-wide by passing cgroup.memory=nokmem to the kernel
327 -----------------------------------------------
351 ----------------------
364 deployments where the total amount of memory per-cgroup is overcommited.
366 box can still run out of non-reclaimable memory.
386 ------------------
394 -------------------------------------------------------------------
398 # mount -t tmpfs none /sys/fs/cgroup
400 # mount -t cgroup none /sys/fs/cgroup/memory -o memory
417 We can write "-1" to reset the ``*.limit_in_bytes(unlimited)``.
435 availability of memory on the system. The user is required to re-read
457 Page-fault scalability is also important. At measuring parallel
458 page fault test, multi-process test may be better than multi-thread
465 -------------------
480 ------------------
491 ---------------------
512 ---------------
522 charged file caches. Some out-of-use page caches may keep charged until
533 -------------
537 per-memory cgroup local status
559 inactive_file # of bytes of file-backed memory on inactive LRU list.
560 active_file # of bytes of file-backed memory on active LRU list.
606 --------------
617 -----------
629 ------------------
639 -------------
641 This is similar to numa_maps but operates on a per-memcg basis. This is
648 per-node page counts including "hierarchical_<counter>" which sums up all
664 The memory controller supports a deep hierarchy and hierarchical accounting.
684 ------------------------------------------------
718 Please note that soft limits is a best-effort feature; it comes with
725 -------------
752 -------------
765 Charges are moved only when you move mm->owner, in other words,
779 --------------------------------------
786 +---+--------------------------------------------------------------------------+
791 +---+--------------------------------------------------------------------------+
800 +---+--------------------------------------------------------------------------+
803 --------
805 - All of moving charge operations are done under cgroup_mutex. It's not good
817 - create an eventfd using eventfd(2);
818 - open memory.usage_in_bytes or memory.memsw.usage_in_bytes;
819 - write string like "<event_fd> <fd of memory.usage_in_bytes> <threshold>" to
825 It's applicable for root and non-root cgroup.
838 - create an eventfd using eventfd(2)
839 - open memory.oom_control file
840 - write string like "<event_fd> <fd of memory.oom_control>" to
846 You can disable the OOM-killer by writing "1" to memory.oom_control file, as:
850 If OOM-killer is disabled, tasks under cgroup will hang/sleep
851 in memory cgroup's OOM-waitqueue when they request accountable memory.
867 - oom_kill_disable 0 or 1
868 (if 1, oom-killer is disabled)
869 - under_oom 0 or 1
890 resources that can be easily reconstructed or re-read from a disk.
893 about to out of memory (OOM) or even the in-kernel OOM killer is on its
899 events are not pass-through. For example, you have three cgroups: A->B->C. Now
909 - "default": this is the default behavior specified above. This mode is the
913 - "hierarchy": events always propagate up to the root, similar to the default
918 - "local": events are pass-through, i.e. they only receive notifications when
927 specified by a comma-delimited string, i.e. "low,hierarchy" specifies
928 hierarchical, pass-through, notification for all ancestor memcgs. Notification
929 that is the default, non pass-through behavior, does not specify a mode.
930 "medium,local" specifies pass-through notification for the medium level.
935 - create an eventfd using eventfd(2);
936 - open memory.pressure_level;
937 - write string as "<event_fd> <fd of memory.pressure_level> <level[,mode]>"
959 (Expect a bunch of notifications, and eventually, the oom-killer will
965 1. Make per-cgroup scanner reclaim not-shared pages first
966 2. Teach controller to account for shared-pages