diff options
author | Daniel Lezcano <daniel.lezcano@free.fr> | 2011-05-26 19:25:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 20:12:34 -0400 |
commit | a77aea92010acf54ad785047234418d5d68772e2 (patch) | |
tree | c7cb57b62fd02bee2baceb79251923f7caec6139 /include/linux | |
parent | d846687d7f84e45f23ecf3846dbb43312a1206dd (diff) |
cgroup: remove the ns_cgroup
The ns_cgroup is an annoying cgroup at the namespace / cgroup frontier and
leads to some problems:
* cgroup creation is out-of-control
* cgroup name can conflict when pids are looping
* it is not possible to have a single process handling a lot of
namespaces without falling in a exponential creation time
* we may want to create a namespace without creating a cgroup
The ns_cgroup was replaced by a compatibility flag 'clone_children',
where a newly created cgroup will copy the parent cgroup values.
The userspace has to manually create a cgroup and add a task to
the 'tasks' file.
This patch removes the ns_cgroup as suggested in the following thread:
https://lists.linux-foundation.org/pipermail/containers/2009-June/018616.html
The 'cgroup_clone' function is removed because it is no longer used.
This is a userspace-visible change. Commit 45531757b45c ("cgroup: notify
ns_cgroup deprecated") (merged into 2.6.27) caused the kernel to emit a
printk warning users that the feature is planned for removal. Since that
time we have heard from XXX users who were affected by this.
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Serge E. Hallyn <serge.hallyn@canonical.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jamal Hadi Salim <hadi@cyberus.ca>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Acked-by: Matt Helsley <matthltc@us.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.h | 3 | ||||
-rw-r--r-- | include/linux/cgroup_subsys.h | 6 | ||||
-rw-r--r-- | include/linux/nsproxy.h | 9 |
3 files changed, 0 insertions, 18 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 1e6cde21fa3..ab4ac0ccb85 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -555,9 +555,6 @@ static inline struct cgroup* task_cgroup(struct task_struct *task, | |||
555 | return task_subsys_state(task, subsys_id)->cgroup; | 555 | return task_subsys_state(task, subsys_id)->cgroup; |
556 | } | 556 | } |
557 | 557 | ||
558 | int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss, | ||
559 | char *nodename); | ||
560 | |||
561 | /* A cgroup_iter should be treated as an opaque object */ | 558 | /* A cgroup_iter should be treated as an opaque object */ |
562 | struct cgroup_iter { | 559 | struct cgroup_iter { |
563 | struct list_head *cg_link; | 560 | struct list_head *cg_link; |
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index cdbfcb8780e..ac663c18776 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h | |||
@@ -19,12 +19,6 @@ SUBSYS(debug) | |||
19 | 19 | ||
20 | /* */ | 20 | /* */ |
21 | 21 | ||
22 | #ifdef CONFIG_CGROUP_NS | ||
23 | SUBSYS(ns) | ||
24 | #endif | ||
25 | |||
26 | /* */ | ||
27 | |||
28 | #ifdef CONFIG_CGROUP_SCHED | 22 | #ifdef CONFIG_CGROUP_SCHED |
29 | SUBSYS(cpu_cgroup) | 23 | SUBSYS(cpu_cgroup) |
30 | #endif | 24 | #endif |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 7b370c7cfef..50d20aba57d 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
@@ -81,13 +81,4 @@ static inline void get_nsproxy(struct nsproxy *ns) | |||
81 | atomic_inc(&ns->count); | 81 | atomic_inc(&ns->count); |
82 | } | 82 | } |
83 | 83 | ||
84 | #ifdef CONFIG_CGROUP_NS | ||
85 | int ns_cgroup_clone(struct task_struct *tsk, struct pid *pid); | ||
86 | #else | ||
87 | static inline int ns_cgroup_clone(struct task_struct *tsk, struct pid *pid) | ||
88 | { | ||
89 | return 0; | ||
90 | } | ||
91 | #endif | ||
92 | |||
93 | #endif | 84 | #endif |