cpuset: allow to keep tasks in empty cpusets
authorLi Zefan <lizefan@huawei.com>
Sun, 9 Jun 2013 09:16:29 +0000 (17:16 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 13 Jun 2013 17:48:32 +0000 (10:48 -0700)
commit5c5cc62321d9df7a9a608346fc649c4528380c8f
treee7e04867979f4f6920d6d1244057112ceb235390
parent070b57fcacc9dfc23a180290079078373fb697e1
cpuset: allow to keep tasks in empty cpusets

To achieve this:

- We call update_tasks_cpumask/nodemask() for empty cpusets when
hotplug happens, instead of moving tasks out of them.

- When a cpuset's masks are changed by writing cpuset.cpus/mems,
we also update tasks in child cpusets which are empty.

v3:
- do propagation work in one place for both hotplug and unplug

v2:
- drop rcu_read_lock before calling update_task_nodemask() and
  update_task_cpumask(), instead of using workqueue.
- add documentation in include/linux/cgroup.h

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup.h
kernel/cpuset.c