Path: blob/master/Documentation/cgroups/memory.txt
10821 views
Memory Resource Controller12NOTE: The Memory Resource Controller has generically been referred to as the3memory controller in this document. Do not confuse memory controller4used here with the memory controller that is used in hardware.56(For editors)7In this document:8When we mention a cgroup (cgroupfs's directory) with memory controller,9we call it "memory cgroup". When you see git-log and source code, you'll10see patch's title and function names tend to use "memcg".11In this document, we avoid using it.1213Benefits and Purpose of the memory controller1415The memory controller isolates the memory behaviour of a group of tasks16from the rest of the system. The article on LWN [12] mentions some probable17uses of the memory controller. The memory controller can be used to1819a. Isolate an application or a group of applications20Memory hungry applications can be isolated and limited to a smaller21amount of memory.22b. Create a cgroup with limited amount of memory, this can be used23as a good alternative to booting with mem=XXXX.24c. Virtualization solutions can control the amount of memory they want25to assign to a virtual machine instance.26d. A CD/DVD burner could control the amount of memory used by the27rest of the system to ensure that burning does not fail due to lack28of available memory.29e. There are several other use cases, find one or use the controller just30for fun (to learn and hack on the VM subsystem).3132Current Status: linux-2.6.34-mmotm(development version of 2010/April)3334Features:35- accounting anonymous pages, file caches, swap caches usage and limiting them.36- private LRU and reclaim routine. (system's global LRU and private LRU37work independently from each other)38- optionally, memory+swap usage can be accounted and limited.39- hierarchical accounting40- soft limit41- moving(recharging) account at moving a task is selectable.42- usage threshold notifier43- oom-killer disable knob and oom-notifier44- Root cgroup has no limit controls.4546Kernel memory and Hugepages are not under control yet. We just manage47pages on LRU. To add more controls, we have to take care of performance.4849Brief summary of control files.5051tasks # attach a task(thread) and show list of threads52cgroup.procs # show list of processes53cgroup.event_control # an interface for event_fd()54memory.usage_in_bytes # show current res_counter usage for memory55(See 5.5 for details)56memory.memsw.usage_in_bytes # show current res_counter usage for memory+Swap57(See 5.5 for details)58memory.limit_in_bytes # set/show limit of memory usage59memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage60memory.failcnt # show the number of memory usage hits limits61memory.memsw.failcnt # show the number of memory+Swap hits limits62memory.max_usage_in_bytes # show max memory usage recorded63memory.memsw.usage_in_bytes # show max memory+Swap usage recorded64memory.soft_limit_in_bytes # set/show soft limit of memory usage65memory.stat # show various statistics66memory.use_hierarchy # set/show hierarchical account enabled67memory.force_empty # trigger forced move charge to parent68memory.swappiness # set/show swappiness parameter of vmscan69(See sysctl's vm.swappiness)70memory.move_charge_at_immigrate # set/show controls of moving charges71memory.oom_control # set/show oom controls.72memory.numa_stat # show the number of memory usage per numa node73741. History7576The memory controller has a long history. A request for comments for the memory77controller was posted by Balbir Singh [1]. At the time the RFC was posted78there were several implementations for memory control. The goal of the79RFC was to build consensus and agreement for the minimal features required80for memory control. The first RSS controller was posted by Balbir Singh[2]81in Feb 2007. Pavel Emelianov [3][4][5] has since posted three versions of the82RSS controller. At OLS, at the resource management BoF, everyone suggested83that we handle both page cache and RSS together. Another request was raised84to allow user space handling of OOM. The current memory controller is85at version 6; it combines both mapped (RSS) and unmapped Page86Cache Control [11].87882. Memory Control8990Memory is a unique resource in the sense that it is present in a limited91amount. If a task requires a lot of CPU processing, the task can spread92its processing over a period of hours, days, months or years, but with93memory, the same physical memory needs to be reused to accomplish the task.9495The memory controller implementation has been divided into phases. These96are:97981. Memory controller992. mlock(2) controller1003. Kernel user memory accounting and slab control1014. user mappings length controller102103The memory controller is the first controller developed.1041052.1. Design106107The core of the design is a counter called the res_counter. The res_counter108tracks the current memory usage and limit of the group of processes associated109with the controller. Each cgroup has a memory controller specific data110structure (mem_cgroup) associated with it.1111122.2. Accounting113114+--------------------+115| mem_cgroup |116| (res_counter) |117+--------------------+118/ ^ \119/ | \120+---------------+ | +---------------+121| mm_struct | |.... | mm_struct |122| | | | |123+---------------+ | +---------------+124|125+ --------------+126|127+---------------+ +------+--------+128| page +----------> page_cgroup|129| | | |130+---------------+ +---------------+131132(Figure 1: Hierarchy of Accounting)133134135Figure 1 shows the important aspects of the controller1361371. Accounting happens per cgroup1382. Each mm_struct knows about which cgroup it belongs to1393. Each page has a pointer to the page_cgroup, which in turn knows the140cgroup it belongs to141142The accounting is done as follows: mem_cgroup_charge() is invoked to setup143the necessary data structures and check if the cgroup that is being charged144is over its limit. If it is then reclaim is invoked on the cgroup.145More details can be found in the reclaim section of this document.146If everything goes well, a page meta-data-structure called page_cgroup is147updated. page_cgroup has its own LRU on cgroup.148(*) page_cgroup structure is allocated at boot/memory-hotplug time.1491502.2.1 Accounting details151152All mapped anon pages (RSS) and cache pages (Page Cache) are accounted.153Some pages which are never reclaimable and will not be on the global LRU154are not accounted. We just account pages under usual VM management.155156RSS pages are accounted at page_fault unless they've already been accounted157for earlier. A file page will be accounted for as Page Cache when it's158inserted into inode (radix-tree). While it's mapped into the page tables of159processes, duplicate accounting is carefully avoided.160161A RSS page is unaccounted when it's fully unmapped. A PageCache page is162unaccounted when it's removed from radix-tree. Even if RSS pages are fully163unmapped (by kswapd), they may exist as SwapCache in the system until they164are really freed. Such SwapCaches also also accounted.165A swapped-in page is not accounted until it's mapped.166167Note: The kernel does swapin-readahead and read multiple swaps at once.168This means swapped-in pages may contain pages for other tasks than a task169causing page fault. So, we avoid accounting at swap-in I/O.170171At page migration, accounting information is kept.172173Note: we just account pages-on-LRU because our purpose is to control amount174of used pages; not-on-LRU pages tend to be out-of-control from VM view.1751762.3 Shared Page Accounting177178Shared pages are accounted on the basis of the first touch approach. The179cgroup that first touches a page is accounted for the page. The principle180behind this approach is that a cgroup that aggressively uses a shared181page will eventually get charged for it (once it is uncharged from182the cgroup that brought it in -- this will happen on memory pressure).183184Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used.185When you do swapoff and make swapped-out pages of shmem(tmpfs) to186be backed into memory in force, charges for pages are accounted against the187caller of swapoff rather than the users of shmem.1881891902.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP)191192Swap Extension allows you to record charge for swap. A swapped-in page is193charged back to original page allocator if possible.194195When swap is accounted, following files are added.196- memory.memsw.usage_in_bytes.197- memory.memsw.limit_in_bytes.198199memsw means memory+swap. Usage of memory+swap is limited by200memsw.limit_in_bytes.201202Example: Assume a system with 4G of swap. A task which allocates 6G of memory203(by mistake) under 2G memory limitation will use all swap.204In this case, setting memsw.limit_in_bytes=3G will prevent bad use of swap.205By using memsw limit, you can avoid system OOM which can be caused by swap206shortage.207208* why 'memory+swap' rather than swap.209The global LRU(kswapd) can swap out arbitrary pages. Swap-out means210to move account from memory to swap...there is no change in usage of211memory+swap. In other words, when we want to limit the usage of swap without212affecting global LRU, memory+swap limit is better than just limiting swap from213OS point of view.214215* What happens when a cgroup hits memory.memsw.limit_in_bytes216When a cgroup hits memory.memsw.limit_in_bytes, it's useless to do swap-out217in this cgroup. Then, swap-out will not be done by cgroup routine and file218caches are dropped. But as mentioned above, global LRU can do swapout memory219from it for sanity of the system's memory management state. You can't forbid220it by cgroup.2212222.5 Reclaim223224Each cgroup maintains a per cgroup LRU which has the same structure as225global VM. When a cgroup goes over its limit, we first try226to reclaim memory from the cgroup so as to make space for the new227pages that the cgroup has touched. If the reclaim is unsuccessful,228an OOM routine is invoked to select and kill the bulkiest task in the229cgroup. (See 10. OOM Control below.)230231The reclaim algorithm has not been modified for cgroups, except that232pages that are selected for reclaiming come from the per cgroup LRU233list.234235NOTE: Reclaim does not work for the root cgroup, since we cannot set any236limits on the root cgroup.237238Note2: When panic_on_oom is set to "2", the whole system will panic.239240When oom event notifier is registered, event will be delivered.241(See oom_control section)2422432.6 Locking244245lock_page_cgroup()/unlock_page_cgroup() should not be called under246mapping->tree_lock.247248Other lock order is following:249PG_locked.250mm->page_table_lock251zone->lru_lock252lock_page_cgroup.253In many cases, just lock_page_cgroup() is called.254per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by255zone->lru_lock, it has no lock of its own.2562573. User Interface2582590. Configuration260261a. Enable CONFIG_CGROUPS262b. Enable CONFIG_RESOURCE_COUNTERS263c. Enable CONFIG_CGROUP_MEM_RES_CTLR264d. Enable CONFIG_CGROUP_MEM_RES_CTLR_SWAP (to use swap extension)2652661. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)267# mount -t tmpfs none /sys/fs/cgroup268# mkdir /sys/fs/cgroup/memory269# mount -t cgroup none /sys/fs/cgroup/memory -o memory2702712. Make the new group and move bash into it272# mkdir /sys/fs/cgroup/memory/0273# echo $$ > /sys/fs/cgroup/memory/0/tasks274275Since now we're in the 0 cgroup, we can alter the memory limit:276# echo 4M > /sys/fs/cgroup/memory/0/memory.limit_in_bytes277278NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,279mega or gigabytes. (Here, Kilo, Mega, Giga are Kibibytes, Mebibytes, Gibibytes.)280281NOTE: We can write "-1" to reset the *.limit_in_bytes(unlimited).282NOTE: We cannot set limits on the root cgroup any more.283284# cat /sys/fs/cgroup/memory/0/memory.limit_in_bytes2854194304286287We can check the usage:288# cat /sys/fs/cgroup/memory/0/memory.usage_in_bytes2891216512290291A successful write to this file does not guarantee a successful set of292this limit to the value written into the file. This can be due to a293number of factors, such as rounding up to page boundaries or the total294availability of memory on the system. The user is required to re-read295this file after a write to guarantee the value committed by the kernel.296297# echo 1 > memory.limit_in_bytes298# cat memory.limit_in_bytes2994096300301The memory.failcnt field gives the number of times that the cgroup limit was302exceeded.303304The memory.stat file gives accounting information. Now, the number of305caches, RSS and Active pages/Inactive pages are shown.3063074. Testing308309For testing features and implementation, see memcg_test.txt.310311Performance test is also important. To see pure memory controller's overhead,312testing on tmpfs will give you good numbers of small overheads.313Example: do kernel make on tmpfs.314315Page-fault scalability is also important. At measuring parallel316page fault test, multi-process test may be better than multi-thread317test because it has noise of shared objects/status.318319But the above two are testing extreme situations.320Trying usual test under memory controller is always helpful.3213224.1 Troubleshooting323324Sometimes a user might find that the application under a cgroup is325terminated by OOM killer. There are several causes for this:3263271. The cgroup limit is too low (just too low to do anything useful)3282. The user is using anonymous memory and swap is turned off or too low329330A sync followed by echo 1 > /proc/sys/vm/drop_caches will help get rid of331some of the pages cached in the cgroup (page cache pages).332333To know what happens, disable OOM_Kill by 10. OOM Control(see below) and334seeing what happens will be helpful.3353364.2 Task migration337338When a task migrates from one cgroup to another, its charge is not339carried forward by default. The pages allocated from the original cgroup still340remain charged to it, the charge is dropped when the page is freed or341reclaimed.342343You can move charges of a task along with task migration.344See 8. "Move charges at task migration"3453464.3 Removing a cgroup347348A cgroup can be removed by rmdir, but as discussed in sections 4.1 and 4.2, a349cgroup might have some charge associated with it, even though all350tasks have migrated away from it. (because we charge against pages, not351against tasks.)352353Such charges are freed or moved to their parent. At moving, both of RSS354and CACHES are moved to parent.355rmdir() may return -EBUSY if freeing/moving fails. See 5.1 also.356357Charges recorded in swap information is not updated at removal of cgroup.358Recorded information is discarded and a cgroup which uses swap (swapcache)359will be charged as a new owner of it.3603613625. Misc. interfaces.3633645.1 force_empty365memory.force_empty interface is provided to make cgroup's memory usage empty.366You can use this interface only when the cgroup has no tasks.367When writing anything to this368369# echo 0 > memory.force_empty370371Almost all pages tracked by this memory cgroup will be unmapped and freed.372Some pages cannot be freed because they are locked or in-use. Such pages are373moved to parent and this cgroup will be empty. This may return -EBUSY if374VM is too busy to free/move all pages immediately.375376Typical use case of this interface is that calling this before rmdir().377Because rmdir() moves all pages to parent, some out-of-use page caches can be378moved to the parent. If you want to avoid that, force_empty will be useful.3793805.2 stat file381382memory.stat file includes following statistics383384# per-memory cgroup local status385cache - # of bytes of page cache memory.386rss - # of bytes of anonymous and swap cache memory.387mapped_file - # of bytes of mapped file (includes tmpfs/shmem)388pgpgin - # of pages paged in (equivalent to # of charging events).389pgpgout - # of pages paged out (equivalent to # of uncharging events).390swap - # of bytes of swap usage391inactive_anon - # of bytes of anonymous memory and swap cache memory on392LRU list.393active_anon - # of bytes of anonymous and swap cache memory on active394inactive LRU list.395inactive_file - # of bytes of file-backed memory on inactive LRU list.396active_file - # of bytes of file-backed memory on active LRU list.397unevictable - # of bytes of memory that cannot be reclaimed (mlocked etc).398399# status considering hierarchy (see memory.use_hierarchy settings)400401hierarchical_memory_limit - # of bytes of memory limit with regard to hierarchy402under which the memory cgroup is403hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to404hierarchy under which memory cgroup is.405406total_cache - sum of all children's "cache"407total_rss - sum of all children's "rss"408total_mapped_file - sum of all children's "cache"409total_pgpgin - sum of all children's "pgpgin"410total_pgpgout - sum of all children's "pgpgout"411total_swap - sum of all children's "swap"412total_inactive_anon - sum of all children's "inactive_anon"413total_active_anon - sum of all children's "active_anon"414total_inactive_file - sum of all children's "inactive_file"415total_active_file - sum of all children's "active_file"416total_unevictable - sum of all children's "unevictable"417418# The following additional stats are dependent on CONFIG_DEBUG_VM.419420inactive_ratio - VM internal parameter. (see mm/page_alloc.c)421recent_rotated_anon - VM internal parameter. (see mm/vmscan.c)422recent_rotated_file - VM internal parameter. (see mm/vmscan.c)423recent_scanned_anon - VM internal parameter. (see mm/vmscan.c)424recent_scanned_file - VM internal parameter. (see mm/vmscan.c)425426Memo:427recent_rotated means recent frequency of LRU rotation.428recent_scanned means recent # of scans to LRU.429showing for better debug please see the code for meanings.430431Note:432Only anonymous and swap cache memory is listed as part of 'rss' stat.433This should not be confused with the true 'resident set size' or the434amount of physical memory used by the cgroup.435'rss + file_mapped" will give you resident set size of cgroup.436(Note: file and shmem may be shared among other cgroups. In that case,437file_mapped is accounted only when the memory cgroup is owner of page438cache.)4394405.3 swappiness441442Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only.443444Following cgroups' swappiness can't be changed.445- root cgroup (uses /proc/sys/vm/swappiness).446- a cgroup which uses hierarchy and it has other cgroup(s) below it.447- a cgroup which uses hierarchy and not the root of hierarchy.4484495.4 failcnt450451A memory cgroup provides memory.failcnt and memory.memsw.failcnt files.452This failcnt(== failure count) shows the number of times that a usage counter453hit its limit. When a memory cgroup hits a limit, failcnt increases and454memory under it will be reclaimed.455456You can reset failcnt by writing 0 to failcnt file.457# echo 0 > .../memory.failcnt4584595.5 usage_in_bytes460461For efficiency, as other kernel components, memory cgroup uses some optimization462to avoid unnecessary cacheline false sharing. usage_in_bytes is affected by the463method and doesn't show 'exact' value of memory(and swap) usage, it's an fuzz464value for efficient access. (Of course, when necessary, it's synchronized.)465If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)466value in memory.stat(see 5.2).4674685.6 numa_stat469470This is similar to numa_maps but operates on a per-memcg basis. This is471useful for providing visibility into the numa locality information within472an memcg since the pages are allowed to be allocated from any physical473node. One of the usecases is evaluating application performance by474combining this information with the application's cpu allocation.475476We export "total", "file", "anon" and "unevictable" pages per-node for477each memcg. The ouput format of memory.numa_stat is:478479total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...480file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...481anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...482unevictable=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...483484And we have total = file + anon + unevictable.4854866. Hierarchy support487488The memory controller supports a deep hierarchy and hierarchical accounting.489The hierarchy is created by creating the appropriate cgroups in the490cgroup filesystem. Consider for example, the following cgroup filesystem491hierarchy492493root494/ | \495/ | \496a b c497| \498| \499d e500501In the diagram above, with hierarchical accounting enabled, all memory502usage of e, is accounted to its ancestors up until the root (i.e, c and root),503that has memory.use_hierarchy enabled. If one of the ancestors goes over its504limit, the reclaim algorithm reclaims from the tasks in the ancestor and the505children of the ancestor.5065076.1 Enabling hierarchical accounting and reclaim508509A memory cgroup by default disables the hierarchy feature. Support510can be enabled by writing 1 to memory.use_hierarchy file of the root cgroup511512# echo 1 > memory.use_hierarchy513514The feature can be disabled by515516# echo 0 > memory.use_hierarchy517518NOTE1: Enabling/disabling will fail if either the cgroup already has other519cgroups created below it, or if the parent cgroup has use_hierarchy520enabled.521522NOTE2: When panic_on_oom is set to "2", the whole system will panic in523case of an OOM event in any cgroup.5245257. Soft limits526527Soft limits allow for greater sharing of memory. The idea behind soft limits528is to allow control groups to use as much of the memory as needed, provided529530a. There is no memory contention531b. They do not exceed their hard limit532533When the system detects memory contention or low memory, control groups534are pushed back to their soft limits. If the soft limit of each control535group is very high, they are pushed back as much as possible to make536sure that one control group does not starve the others of memory.537538Please note that soft limits is a best effort feature, it comes with539no guarantees, but it does its best to make sure that when memory is540heavily contended for, memory is allocated based on the soft limit541hints/setup. Currently soft limit based reclaim is setup such that542it gets invoked from balance_pgdat (kswapd).5435447.1 Interface545546Soft limits can be setup by using the following commands (in this example we547assume a soft limit of 256 MiB)548549# echo 256M > memory.soft_limit_in_bytes550551If we want to change this to 1G, we can at any time use552553# echo 1G > memory.soft_limit_in_bytes554555NOTE1: Soft limits take effect over a long period of time, since they involve556reclaiming memory for balancing between memory cgroups557NOTE2: It is recommended to set the soft limit always below the hard limit,558otherwise the hard limit will take precedence.5595608. Move charges at task migration561562Users can move charges associated with a task along with task migration, that563is, uncharge task's pages from the old cgroup and charge them to the new cgroup.564This feature is not supported in !CONFIG_MMU environments because of lack of565page tables.5665678.1 Interface568569This feature is disabled by default. It can be enabled(and disabled again) by570writing to memory.move_charge_at_immigrate of the destination cgroup.571572If you want to enable it:573574# echo (some positive value) > memory.move_charge_at_immigrate575576Note: Each bits of move_charge_at_immigrate has its own meaning about what type577of charges should be moved. See 8.2 for details.578Note: Charges are moved only when you move mm->owner, IOW, a leader of a thread579group.580Note: If we cannot find enough space for the task in the destination cgroup, we581try to make space by reclaiming memory. Task migration may fail if we582cannot make enough space.583Note: It can take several seconds if you move charges much.584585And if you want disable it again:586587# echo 0 > memory.move_charge_at_immigrate5885898.2 Type of charges which can be move590591Each bits of move_charge_at_immigrate has its own meaning about what type of592charges should be moved. But in any cases, it must be noted that an account of593a page or a swap can be moved only when it is charged to the task's current(old)594memory cgroup.595596bit | what type of charges would be moved ?597-----+------------------------------------------------------------------------5980 | A charge of an anonymous page(or swap of it) used by the target task.599| Those pages and swaps must be used only by the target task. You must600| enable Swap Extension(see 2.4) to enable move of swap charges.601-----+------------------------------------------------------------------------6021 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory)603| and swaps of tmpfs file) mmapped by the target task. Unlike the case of604| anonymous pages, file pages(and swaps) in the range mmapped by the task605| will be moved even if the task hasn't done page fault, i.e. they might606| not be the task's "RSS", but other task's "RSS" that maps the same file.607| And mapcount of the page is ignored(the page can be moved even if608| page_mapcount(page) > 1). You must enable Swap Extension(see 2.4) to609| enable move of swap charges.6106118.3 TODO612613- Implement madvise(2) to let users decide the vma to be moved or not to be614moved.615- All of moving charge operations are done under cgroup_mutex. It's not good616behavior to hold the mutex too long, so we may need some trick.6176189. Memory thresholds619620Memory cgroup implements memory thresholds using cgroups notification621API (see cgroups.txt). It allows to register multiple memory and memsw622thresholds and gets notifications when it crosses.623624To register a threshold application need:625- create an eventfd using eventfd(2);626- open memory.usage_in_bytes or memory.memsw.usage_in_bytes;627- write string like "<event_fd> <fd of memory.usage_in_bytes> <threshold>" to628cgroup.event_control.629630Application will be notified through eventfd when memory usage crosses631threshold in any direction.632633It's applicable for root and non-root cgroup.63463510. OOM Control636637memory.oom_control file is for OOM notification and other controls.638639Memory cgroup implements OOM notifier using cgroup notification640API (See cgroups.txt). It allows to register multiple OOM notification641delivery and gets notification when OOM happens.642643To register a notifier, application need:644- create an eventfd using eventfd(2)645- open memory.oom_control file646- write string like "<event_fd> <fd of memory.oom_control>" to647cgroup.event_control648649Application will be notified through eventfd when OOM happens.650OOM notification doesn't work for root cgroup.651652You can disable OOM-killer by writing "1" to memory.oom_control file, as:653654#echo 1 > memory.oom_control655656This operation is only allowed to the top cgroup of sub-hierarchy.657If OOM-killer is disabled, tasks under cgroup will hang/sleep658in memory cgroup's OOM-waitqueue when they request accountable memory.659660For running them, you have to relax the memory cgroup's OOM status by661* enlarge limit or reduce usage.662To reduce usage,663* kill some tasks.664* move some tasks to other group with account migration.665* remove some files (on tmpfs?)666667Then, stopped tasks will work again.668669At reading, current status of OOM is shown.670oom_kill_disable 0 or 1 (if 1, oom-killer is disabled)671under_oom 0 or 1 (if 1, the memory cgroup is under OOM, tasks may672be stopped.)67367411. TODO6756761. Add support for accounting huge pages (as a separate controller)6772. Make per-cgroup scanner reclaim not-shared pages first6783. Teach controller to account for shared-pages6794. Start reclamation in the background when the limit is680not yet hit but the usage is getting closer681682Summary683684Overall, the memory controller has been a stable controller and has been685commented and discussed quite extensively in the community.686687References6886891. Singh, Balbir. RFC: Memory Controller, http://lwn.net/Articles/206697/6902. Singh, Balbir. Memory Controller (RSS Control),691http://lwn.net/Articles/222762/6923. Emelianov, Pavel. Resource controllers based on process cgroups693http://lkml.org/lkml/2007/3/6/1986944. Emelianov, Pavel. RSS controller based on process cgroups (v2)695http://lkml.org/lkml/2007/4/9/786965. Emelianov, Pavel. RSS controller based on process cgroups (v3)697http://lkml.org/lkml/2007/5/30/2446986. Menage, Paul. Control Groups v10, http://lwn.net/Articles/236032/6997. Vaidyanathan, Srinivasan, Control Groups: Pagecache accounting and control700subsystem (v3), http://lwn.net/Articles/235534/7018. Singh, Balbir. RSS controller v2 test results (lmbench),702http://lkml.org/lkml/2007/5/17/2327039. Singh, Balbir. RSS controller v2 AIM9 results704http://lkml.org/lkml/2007/5/18/170510. Singh, Balbir. Memory controller v6 test results,706http://lkml.org/lkml/2007/8/19/3670711. Singh, Balbir. Memory controller introduction (v6),708http://lkml.org/lkml/2007/8/17/6970912. Corbet, Jonathan, Controlling memory use in cgroups,710http://lwn.net/Articles/243795/711712713