+ config KERNEL_MEMCG
+ bool "Memory Resource Controller for Control Groups"
+ default n
+ depends on KERNEL_RESOURCE_COUNTERS
+ help
+ Provides a memory resource controller that manages both anonymous
+ memory and page cache. (See Documentation/cgroups/memory.txt)
+
+ Note that setting this option increases fixed memory overhead
+ associated with each page of memory in the system. By this,
+ 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
+ usage tracking struct at boot. Total amount of this is printed out
+ at boot.
+
+ Only enable when you're ok with these trade offs and really
+ sure you need the memory resource controller. Even when you enable
+ this, you can set "cgroup_disable=memory" at your boot option to
+ disable memory resource controller and you can avoid overheads.
+ (and lose benefits of memory resource controller)
+
+ This config option also selects MM_OWNER config option, which
+ could in turn add some fork/exit overhead.
+
+ config KERNEL_MEMCG_SWAP
+ bool "Memory Resource Controller Swap Extension"
+ default n
+ depends on KERNEL_MEMCG
+ help
+ Add swap management feature to memory resource controller. When you
+ enable this, you can limit mem+swap usage per cgroup. In other words,
+ when you disable this, memory resource controller has no cares to
+ usage of swap...a process can exhaust all of the swap. This extension
+ is useful when you want to avoid exhaustion swap but this itself
+ adds more overheads and consumes memory for remembering information.
+ Especially if you use 32bit system or small memory system, please
+ be careful about enabling this. When memory resource controller
+ is disabled by boot option, this will be automatically disabled and
+ there will be no overhead from this. Even when you set this config=y,
+ if boot option "swapaccount=0" is set, swap will not be accounted.
+ Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
+ size is 4096bytes, 512k per 1Gbytes of swap.
+
+ config KERNEL_MEMCG_SWAP_ENABLED
+ bool "Memory Resource Controller Swap Extension enabled by default"
+ default n
+ depends on KERNEL_MEMCG_SWAP
+ help
+ Memory Resource Controller Swap Extension comes with its price in
+ a bigger memory consumption. General purpose distribution kernels
+ which want to enable the feature but keep it disabled by default
+ and let the user enable it by swapaccount boot command line
+ parameter should have this option unselected.
+ For those who want to have the feature enabled by default should
+ select this option (if, for some reason, they need to disable it
+ then swapaccount=0 does the trick).
+
+
+ config KERNEL_MEMCG_KMEM
+ bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
+ default n
+ depends on KERNEL_MEMCG
+ help
+ The Kernel Memory extension for Memory Resource Controller can limit
+ the amount of memory used by kernel objects in the system. Those are
+ fundamentally different from the entities handled by the standard
+ Memory Controller, which are page-based, and can be swapped. Users of
+ the kmem extension can use it to guarantee that no group of processes
+ will ever exhaust kernel resources alone.
+
+ config KERNEL_PERF_EVENTS
+ bool
+ default y if KERNEL_CGROUP_PERF
+
+ config KERNEL_CGROUP_PERF
+ bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
+ default n
+ help
+ This option extends the per-cpu mode to restrict monitoring to
+ threads which belong to the cgroup specified and run on the
+ designated cpu.