aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPaul Menage <menage@google.com>2007-10-19 02:39:34 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:36 -0400
commit697f41610863c9264a7ae26dac9a387c9dda8c84 (patch)
tree9d4321f93abe36920a8e9d5239d120803f6cabbc /include/linux
parentb4f48b6363c81ca743ef46943ef23fd72e60f679 (diff)
Task Control Groups: add cgroup_clone() interface
Add support for cgroup_clone(), a way to create new cgroups intended to be used for systems such as namespace unsharing. A new subsystem callback, post_clone(), is added to allow subsystems to automatically configure cloned cgroups. 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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cgroup.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 792ad74be170..b21cf093ac62 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -182,6 +182,7 @@ struct cgroup_subsys {
182 void (*exit)(struct cgroup_subsys *ss, struct task_struct *task); 182 void (*exit)(struct cgroup_subsys *ss, struct task_struct *task);
183 int (*populate)(struct cgroup_subsys *ss, 183 int (*populate)(struct cgroup_subsys *ss,
184 struct cgroup *cont); 184 struct cgroup *cont);
185 void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cont);
185 void (*bind)(struct cgroup_subsys *ss, struct cgroup *root); 186 void (*bind)(struct cgroup_subsys *ss, struct cgroup *root);
186 int subsys_id; 187 int subsys_id;
187 int active; 188 int active;
@@ -221,6 +222,8 @@ static inline struct cgroup* task_cgroup(struct task_struct *task,
221 222
222int cgroup_path(const struct cgroup *cont, char *buf, int buflen); 223int cgroup_path(const struct cgroup *cont, char *buf, int buflen);
223 224
225int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss);
226
224#else /* !CONFIG_CGROUPS */ 227#else /* !CONFIG_CGROUPS */
225 228
226static inline int cgroup_init_early(void) { return 0; } 229static inline int cgroup_init_early(void) { return 0; }