mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00:00
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>
This commit is contained in:
parent
b4f48b6363
commit
697f416108
3 changed files with 145 additions and 0 deletions
|
@ -182,6 +182,7 @@ struct cgroup_subsys {
|
|||
void (*exit)(struct cgroup_subsys *ss, struct task_struct *task);
|
||||
int (*populate)(struct cgroup_subsys *ss,
|
||||
struct cgroup *cont);
|
||||
void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cont);
|
||||
void (*bind)(struct cgroup_subsys *ss, struct cgroup *root);
|
||||
int subsys_id;
|
||||
int active;
|
||||
|
@ -221,6 +222,8 @@ static inline struct cgroup* task_cgroup(struct task_struct *task,
|
|||
|
||||
int cgroup_path(const struct cgroup *cont, char *buf, int buflen);
|
||||
|
||||
int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss);
|
||||
|
||||
#else /* !CONFIG_CGROUPS */
|
||||
|
||||
static inline int cgroup_init_early(void) { return 0; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue