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 | e6a1105ba08b265023dd71a4174fb4a29ebc7083 (patch) | |
tree | c171a012df4364b0feac5d6f1bf8c354164ab0f9 /include | |
parent | aae8aab40367036931608fdaf9e2dc568b516f19 (diff) |
cgroups: subsystem module loading interface
Add interface between cgroups subsystem management and module loading
This patch implements rudimentary module-loading support for cgroups -
namely, a cgroup_load_subsys (similar to cgroup_init_subsys) for use as a
module initcall, and a struct module pointer in struct cgroup_subsys.
Several functions that might be wanted by modules have had EXPORT_SYMBOL
added to them, but it's unclear exactly which functions want it and which
won't.
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')
-rw-r--r-- | include/linux/cgroup.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 28319a9fe569..402ce477c47e 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -37,6 +37,7 @@ extern void cgroup_post_fork(struct task_struct *p); | |||
37 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); | 37 | 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 | 41 | ||
41 | extern const struct file_operations proc_cgroup_operations; | 42 | extern const struct file_operations proc_cgroup_operations; |
42 | 43 | ||
@@ -486,6 +487,9 @@ struct cgroup_subsys { | |||
486 | /* used when use_id == true */ | 487 | /* used when use_id == true */ |
487 | struct idr idr; | 488 | struct idr idr; |
488 | spinlock_t id_lock; | 489 | spinlock_t id_lock; |
490 | |||
491 | /* should be defined only by modular subsystems */ | ||
492 | struct module *module; | ||
489 | }; | 493 | }; |
490 | 494 | ||
491 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; | 495 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; |