diff options
author | Ben Blum <bblum@andrew.cmu.edu> | 2010-03-10 18:22:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:36 -0500 |
commit | cf5d5941fda647fe3d2f2d00cf9e0245236a5f08 (patch) | |
tree | deee6501f2f08089a2cd62732c3848a59a6f6a93 /include/linux/cgroup.h | |
parent | e6a1105ba08b265023dd71a4174fb4a29ebc7083 (diff) |
cgroups: subsystem module unloading
Provides support for unloading modular subsystems.
This patch adds a new function cgroup_unload_subsys which is to be used
for removing a loaded subsystem during module deletion. Reference
counting of the subsystems' modules is moved from once (at load time) to
once per attached hierarchy (in parse_cgroupfs_options and
rebind_subsystems) (i.e., 0 or 1).
Signed-off-by: Ben Blum <bblum@andrew.cmu.edu>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 402ce477c47e..2a59d3101e5d 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -38,6 +38,7 @@ extern void cgroup_exit(struct task_struct *p, int run_callbacks); | |||
38 | extern int cgroupstats_build(struct cgroupstats *stats, | 38 | extern int cgroupstats_build(struct cgroupstats *stats, |
39 | struct dentry *dentry); | 39 | struct dentry *dentry); |
40 | extern int cgroup_load_subsys(struct cgroup_subsys *ss); | 40 | extern int cgroup_load_subsys(struct cgroup_subsys *ss); |
41 | extern void cgroup_unload_subsys(struct cgroup_subsys *ss); | ||
41 | 42 | ||
42 | extern const struct file_operations proc_cgroup_operations; | 43 | extern const struct file_operations proc_cgroup_operations; |
43 | 44 | ||
@@ -271,7 +272,8 @@ struct css_set { | |||
271 | /* | 272 | /* |
272 | * Set of subsystem states, one for each subsystem. This array | 273 | * Set of subsystem states, one for each subsystem. This array |
273 | * is immutable after creation apart from the init_css_set | 274 | * is immutable after creation apart from the init_css_set |
274 | * during subsystem registration (at boot time). | 275 | * during subsystem registration (at boot time) and modular subsystem |
276 | * loading/unloading. | ||
275 | */ | 277 | */ |
276 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; | 278 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; |
277 | 279 | ||