Task Control Groups: basic task cgroup framework
Generic Process Control Groups
--------------------------
There have recently been various proposals floating around for
resource management/accounting and other task grouping subsystems in
the kernel, including ResGroups, User BeanCounters, NSProxy
cgroups, and others. These all need the basic abstraction of being
able to group together multiple processes in an aggregate, in order to
track/limit the resources permitted to those processes, or control
other behaviour of the processes, and all implement this grouping in
different ways.
This patchset provides a framework for tracking and grouping processes
into arbitrary "cgroups" and assigning arbitrary state to those
groupings, in order to control the behaviour of the cgroup as an
aggregate.
The intention is that the various resource management and
virtualization/cgroup efforts can also become task cgroup
clients, with the result that:
- the userspace APIs are (somewhat) normalised
- it's easier to test e.g. the ResGroups CPU controller in
conjunction with the BeanCounters memory controller, or use either of
them as the resource-control portion of a virtual server system.
- the additional kernel footprint of any of the competing resource
management systems is substantially reduced, since it doesn't need
to provide process grouping/containment, hence improving their
chances of getting into the kernel
This patch:
Add the main task cgroups framework - the cgroup filesystem, and the
basic structures for tracking membership and associating subsystem state
objects to tasks.
Signed-off-by: Paul Menage <menage@google.com>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 06:39:30 +00:00
|
|
|
/* Add subsystem definitions of the form SUBSYS(<name>) in this
|
|
|
|
* file. Surround each one by a line of comment markers so that
|
|
|
|
* patches don't collide
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* */
|
|
|
|
|
|
|
|
/* */
|
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_CPUSETS)
|
2007-10-19 06:39:39 +00:00
|
|
|
SUBSYS(cpuset)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_DEBUG)
|
2007-10-19 06:39:43 +00:00
|
|
|
SUBSYS(debug)
|
|
|
|
#endif
|
|
|
|
|
Task Control Groups: basic task cgroup framework
Generic Process Control Groups
--------------------------
There have recently been various proposals floating around for
resource management/accounting and other task grouping subsystems in
the kernel, including ResGroups, User BeanCounters, NSProxy
cgroups, and others. These all need the basic abstraction of being
able to group together multiple processes in an aggregate, in order to
track/limit the resources permitted to those processes, or control
other behaviour of the processes, and all implement this grouping in
different ways.
This patchset provides a framework for tracking and grouping processes
into arbitrary "cgroups" and assigning arbitrary state to those
groupings, in order to control the behaviour of the cgroup as an
aggregate.
The intention is that the various resource management and
virtualization/cgroup efforts can also become task cgroup
clients, with the result that:
- the userspace APIs are (somewhat) normalised
- it's easier to test e.g. the ResGroups CPU controller in
conjunction with the BeanCounters memory controller, or use either of
them as the resource-control portion of a virtual server system.
- the additional kernel footprint of any of the competing resource
management systems is substantially reduced, since it doesn't need
to provide process grouping/containment, hence improving their
chances of getting into the kernel
This patch:
Add the main task cgroups framework - the cgroup filesystem, and the
basic structures for tracking membership and associating subsystem state
objects to tasks.
Signed-off-by: Paul Menage <menage@google.com>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 06:39:30 +00:00
|
|
|
/* */
|
2007-10-19 06:39:45 +00:00
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_SCHED)
|
2007-10-19 06:41:03 +00:00
|
|
|
SUBSYS(cpu_cgroup)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
2007-12-02 19:04:49 +00:00
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_CPUACCT)
|
2007-12-02 19:04:49 +00:00
|
|
|
SUBSYS(cpuacct)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_MEMCG)
|
2008-02-07 08:13:50 +00:00
|
|
|
SUBSYS(mem_cgroup)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
2008-04-29 08:00:10 +00:00
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_DEVICE)
|
2008-04-29 08:00:10 +00:00
|
|
|
SUBSYS(devices)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
2008-10-19 03:27:21 +00:00
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_FREEZER)
|
2008-10-19 03:27:21 +00:00
|
|
|
SUBSYS(freezer)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
2008-11-08 06:56:00 +00:00
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_NET_CLS_CGROUP)
|
2008-11-08 06:56:00 +00:00
|
|
|
SUBSYS(net_cls)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
2009-12-03 17:59:42 +00:00
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_BLK_CGROUP)
|
2009-12-03 17:59:42 +00:00
|
|
|
SUBSYS(blkio)
|
|
|
|
#endif
|
|
|
|
|
2011-11-22 05:10:51 +00:00
|
|
|
/* */
|
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_PERF)
|
2011-02-14 09:20:01 +00:00
|
|
|
SUBSYS(perf)
|
|
|
|
#endif
|
|
|
|
|
2009-12-03 17:59:42 +00:00
|
|
|
/* */
|
2011-11-22 05:10:51 +00:00
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_NETPRIO_CGROUP)
|
2011-11-22 05:10:51 +00:00
|
|
|
SUBSYS(net_prio)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
2012-07-31 23:42:12 +00:00
|
|
|
|
2012-09-12 14:12:05 +00:00
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_HUGETLB)
|
2012-07-31 23:42:12 +00:00
|
|
|
SUBSYS(hugetlb)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
2013-03-23 23:11:31 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_CGROUP_BCACHE
|
|
|
|
SUBSYS(bcache)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|
2014-01-27 22:50:08 +00:00
|
|
|
|
|
|
|
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_BFQIO)
|
|
|
|
SUBSYS(bfqio)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* */
|