]> Git Repo - linux.git/commit
cgroups: add cgroup support for enabling controllers at boot time
authorPaul Menage <[email protected]>
Fri, 4 Apr 2008 21:29:57 +0000 (14:29 -0700)
committerLinus Torvalds <[email protected]>
Fri, 4 Apr 2008 21:46:26 +0000 (14:46 -0700)
commit8bab8dded67d026c39367bbd5e27d2f6c556c38e
treed80f8f85f1da496c56bfa8575f0b59eba7c2ef55
parent3a143125ddc4e2e0ca1e67fb4bedd45c36e59cc7
cgroups: add cgroup support for enabling controllers at boot time

The effects of cgroup_disable=foo are:

- foo isn't auto-mounted if you mount all cgroups in a single hierarchy
- foo isn't visible as an individually mountable subsystem

As a result there will only ever be one call to foo->create(), at init time;
all processes will stay in this group, and the group will never be mounted on
a visible hierarchy.  Any additional effects (e.g.  not allocating metadata)
are up to the foo subsystem.

This doesn't handle early_init subsystems (their "disabled" bit isn't set be,
but it could easily be extended to do so if any of the early_init systems
wanted it - I think it would just involve some nastier parameter processing
since it would occur before the command-line argument parser had been run.

Hugh said:

  Ballpark figures, I'm trying to get this question out rather than
  processing the exact numbers: CONFIG_CGROUP_MEM_RES_CTLR adds 15% overhead
  to the affected paths, booting with cgroup_disable=memory cuts that back to
  1% overhead (due to slightly bigger struct page).

  I'm no expert on distros, they may have no interest whatever in
  CONFIG_CGROUP_MEM_RES_CTLR=y; and the rest of us can easily build with or
  without it, or apply the cgroup_disable=memory patches.

Unix bench's execl test result on x86_64 was

== just after boot without mounting any cgroup fs.==
mem_cgorup=off : Execl Throughput       43.0     3150.1      732.6
mem_cgroup=on  : Execl Throughput       43.0     2932.6      682.0
==

[[email protected]: fix boot option parsing]
Signed-off-by: Balbir Singh <[email protected]>
Cc: Paul Menage <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Sudhir Kumar <[email protected]>
Cc: YAMAMOTO Takashi <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Li Zefan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Documentation/kernel-parameters.txt
include/linux/cgroup.h
kernel/cgroup.c
This page took 0.061664 seconds and 4 git commands to generate.