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 | deb7aa308ea264b374d1db970174f5728a2faa27 (patch) | |
tree | eda76fcb0a19269db2d624f7c9eca5bb52c7102b /block | |
parent | 4e4c9a140fc2ecf5e086922ccd2022bdabe509b6 (diff) |
cpuset: reorganize CPU / memory hotplug handling
Reorganize hotplug path to prepare for async hotplug handling.
* Both CPU and memory hotplug handlings are collected into a single
function - cpuset_handle_hotplug(). It doesn't take any argument
but compares the current setttings of top_cpuset against what's
actually available to determine what happened. This function
directly updates top_cpuset. If there are CPUs or memory nodes
which are taken down, cpuset_propagate_hotplug() in invoked on all
!root cpusets.
* cpuset_propagate_hotplug() is responsible for updating the specified
cpuset so that it doesn't include any resource which isn't available
to top_cpuset. If no CPU or memory is left after update, all tasks
are moved to the nearest ancestor with both resources.
* update_tasks_cpumask() and update_tasks_nodemask() are now always
called after cpus or mems masks are updated even if the cpuset
doesn't have any task. This is for brevity and not expected to have
any measureable effect.
* cpu_active_mask and N_HIGH_MEMORY are read exactly once per
cpuset_handle_hotplug() invocation, all cpusets share the same view
of what resources are available, and cpuset_handle_hotplug() can
handle multiple resources going up and down. These properties will
allow async operation.
The reorganization, while drastic, is equivalent and shouldn't cause
any behavior difference. This will enable making hotplug handling
async and remove get_online_cpus() -> cgroup_mutex nesting.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions