diff options
author | Tejun Heo <tj@kernel.org> | 2013-01-07 08:51:07 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-01-07 08:51:07 -0800 |
commit | 8d03394877ecdf87e1d694664c460747b8e05aa1 (patch) | |
tree | d7f2301996b9e0a747ada2385244c670e7da7bb2 /samples | |
parent | 699140ba838dd3fa2c5cce474e14f194b09f91aa (diff) |
cpuset: make CPU / memory hotplug propagation asynchronous
cpuset_hotplug_workfn() has been invoking cpuset_propagate_hotplug()
directly to propagate hotplug updates to !root cpusets; however, this
has the following problems.
* cpuset locking is scheduled to be decoupled from cgroup_mutex,
cgroup_mutex will be unexported, and cgroup_attach_task() will do
cgroup locking internally, so propagation can't synchronously move
tasks to a parent cgroup while walking the hierarchy.
* We can't use cgroup generic tree iterator because propagation to
each cpuset may sleep. With propagation done asynchronously, we can
lose the rather ugly cpuset specific iteration.
Convert cpuset_propagate_hotplug() to
cpuset_propagate_hotplug_workfn() and execute it from newly added
cpuset->hotplug_work. The work items are run on an ordered workqueue,
so the propagation order is preserved. cpuset_hotplug_workfn()
schedules all propagations while holding cgroup_mutex and waits for
completion without cgroup_mutex. Each in-flight propagation holds a
reference to the cpuset->css.
This patch doesn't cause any functional difference.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions