public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] cgroups: support for module-loadable subsystems
@ 2009-12-31  5:10 Ben Blum
  2009-12-31  5:12 ` [PATCH v4 1/4] cgroups: revamp subsys array Ben Blum
                   ` (4 more replies)
  0 siblings, 5 replies; 28+ messages in thread
From: Ben Blum @ 2009-12-31  5:10 UTC (permalink / raw)
  To: linux-kernel, containers, lizf, akpm, menage, bblum

[This is a revision of http://lkml.org/lkml/2009/12/21/211 ]

This patch series implements support for building, loading, and
unloading subsystems as modules, both within and outside the kernel
source tree. It provides an interface cgroup_load_subsys() and
cgroup_unload_subsys() which modular subsystems can use to register and
depart during runtime. The net_cls classifier subsystem serves as the
example for a subsystem which can be converted into a module using these
changes.

Patch #1 sets up the subsys[] array so its contents can be dynamic as
modules appear and (eventually) disappear. Iterations over the array are
modified to handle when subsystems are absent, and the dynamic section
of the array is protected by cgroup_mutex.

Patch #2 implements an interface for modules to load subsystems, called
cgroup_load_subsys, similar to cgroup_init_subsys, and adds a module
pointer in struct cgroup_subsys.

Patch #3 adds a mechanism for unloading modular subsystems, which
includes a more advanced rework of the rudimentary reference counting
introduced in patch 2.

Patch #4 modifies the net_cls subsystem, which already had some module
declarations, to be configurable as a module, which also serves as a
simple proof-of-concept.

Part of implementing patches 2 and 4 involved updating css pointers in
each css_set when the module appears or leaves. In doing this, it was
discovered that css_sets always remain linked to the dummy cgroup,
regardless of whether or not any subsystems are actually bound to it
(i.e., not mounted on an actual hierarchy). The subsystem loading and
unloading code therefore should keep in mind the special cases where the
added subsystem is the only one in the dummy cgroup (and therefore all
css_sets need to be linked back into it) and where the removed subsys
was the only one in the dummy cgroup (and therefore all css_sets should
be unlinked from it) - however, as all css_sets always stay attached to
the dummy cgroup anyway, these cases are ignored. Any fix that addresses
this issue should also make sure these cases are addressed in the
subsystem loading and unloading code.

-- bblum

---
 Documentation/cgroups/cgroups.txt |    9
 include/linux/cgroup.h            |   18 +
 kernel/cgroup.c                   |  388 +++++++++++++++++++++++++++++++++-----
 net/sched/Kconfig                 |    5
 net/sched/cls_cgroup.c            |   36 ++-
 5 files changed, 400 insertions(+), 56 deletions(-)


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2010-01-14 11:43 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-31  5:10 [PATCH v4 0/4] cgroups: support for module-loadable subsystems Ben Blum
2009-12-31  5:12 ` [PATCH v4 1/4] cgroups: revamp subsys array Ben Blum
2009-12-31  5:13 ` [PATCH v4 2/4] cgroups: subsystem module loading interface Ben Blum
2009-12-31  5:14 ` [PATCH v4 3/4] cgroups: subsystem module unloading Ben Blum
2009-12-31  5:15 ` [PATCH v4 4/4] cgroups: net_cls as module Ben Blum
2010-01-07  0:04 ` [PATCH v4 0/4] cgroups: support for module-loadable subsystems Andrew Morton
2010-01-07  1:26   ` Ben Blum
2010-01-07  3:07     ` KAMEZAWA Hiroyuki
2010-01-07  6:42       ` Li Zefan
2010-01-07  7:16         ` KAMEZAWA Hiroyuki
2010-01-07  7:48           ` Ben Blum
2010-01-07  7:51             ` KAMEZAWA Hiroyuki
2010-01-07  8:04               ` Ben Blum
2010-01-07  8:14         ` Ben Blum
2010-01-07  8:22           ` Ben Blum
2010-01-08  5:27         ` Ben Blum
2010-01-08  5:29           ` [RFC] [PATCH 1/2] cgroups: modular subsystems support for use_id Ben Blum
2010-01-08  5:30           ` [RFC] [PATCH 2/2] cgroups: blkio subsystem as module Ben Blum
2010-01-08 15:10             ` Vivek Goyal
2010-01-12  0:21               ` KAMEZAWA Hiroyuki
2010-01-14  9:32                 ` Balbir Singh
2010-01-14 11:42                   ` Vivek Goyal
2010-01-08 16:33             ` Vivek Goyal
2010-01-12 23:34               ` Ben Blum
2010-01-12 23:36                 ` [PATCH v2 1/2] cgroups: modular subsystems support for use_id Ben Blum
2010-01-12 23:37                 ` [PATCH v2 2/2] cgroups: blkio subsystem as module Ben Blum
2010-01-14  9:15                   ` Jens Axboe
2010-01-14  9:29                     ` Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox