diff options
author | Li Zefan <lizefan@huawei.com> | 2013-06-09 05:16:46 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-06-13 13:48:33 -0400 |
commit | 88fa523bff295f1d60244a54833480b02f775152 (patch) | |
tree | 45231f9e9d1ec3612bbe3ce5d14673f27c4cbb12 /include/linux | |
parent | 5c5cc62321d9df7a9a608346fc649c4528380c8f (diff) |
cpuset: allow to move tasks to empty cpusets
Currently some cpuset behaviors are not friendly when cpuset is co-mounted
with other cgroup controllers.
Now with this patchset if cpuset is mounted with sane_behavior option,
it behaves differently:
- Tasks will be kept in empty cpusets when hotplug happens and take
masks of ancestors with non-empty cpus/mems, instead of being moved to
an ancestor.
- A task can be moved into an empty cpuset, and again it takes masks of
ancestors, so the user can drop a task into a newly created cgroup without
having to do anything for it.
As tasks can reside in empy cpusets, here're some rules:
- They can be moved to another cpuset, regardless it's empty or not.
- Though it takes masks from ancestors, it takes other configs from the
empty cpuset.
- If the ancestors' masks are changed, those tasks will also be updated
to take new masks.
v2: add documentation in include/linux/cgroup.h
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cgroup.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 53e81a61be57..74e8b8e4cd7f 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -281,6 +281,9 @@ enum { | |||
281 | * and take masks of ancestors with non-empty cpus/mems, instead of | 281 | * and take masks of ancestors with non-empty cpus/mems, instead of |
282 | * being moved to an ancestor. | 282 | * being moved to an ancestor. |
283 | * | 283 | * |
284 | * - cpuset: a task can be moved into an empty cpuset, and again it | ||
285 | * takes masks of ancestors. | ||
286 | * | ||
284 | * - memcg: use_hierarchy is on by default and the cgroup file for | 287 | * - memcg: use_hierarchy is on by default and the cgroup file for |
285 | * the flag is not created. | 288 | * the flag is not created. |
286 | * | 289 | * |