memcg: mem+swap controller Kconfig
Config and control variable for mem+swap controller. This patch adds CONFIG_CGROUP_MEM_RES_CTLR_SWAP (memory resource controller swap extension.) For accounting swap, it's obvious that we have to use additional memory to remember "who uses swap". This adds more overhead. So, it's better to offer "choice" to users. This patch adds 2 choices. This patch adds 2 parameters to enable swap extension or not. - CONFIG - boot option Reviewed-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
d13d144309
commit
c077719be8
17
init/Kconfig
17
init/Kconfig
@ -428,6 +428,23 @@ config CGROUP_MEM_RES_CTLR
|
||||
config MM_OWNER
|
||||
bool
|
||||
|
||||
config CGROUP_MEM_RES_CTLR_SWAP
|
||||
bool "Memory Resource Controller Swap Extension(EXPERIMENTAL)"
|
||||
depends on CGROUP_MEM_RES_CTLR && SWAP && EXPERIMENTAL
|
||||
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 "noswapaccount" is set, swap will not be accounted.
|
||||
|
||||
|
||||
endmenu
|
||||
|
||||
config SYSFS_DEPRECATED
|
||||
|
Reference in New Issue
Block a user