From: Li Zefan Date: Wed, 9 Jul 2014 08:49:04 +0000 (+0800) Subject: cpuset: enable onlined cpu/node in effective masks X-Git-Tag: omap-for-v3.17/fixes-against-rc2~190^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be4c9dd7aee5ecf3e748da68c27b38bdca70d444;p=pandora-kernel.git cpuset: enable onlined cpu/node in effective masks Firstly offline cpu1: # echo 0-1 > cpuset.cpus # echo 0 > /sys/devices/system/cpu/cpu1/online # cat cpuset.cpus 0-1 # cat cpuset.effective_cpus 0 Then online it: # echo 1 > /sys/devices/system/cpu/cpu1/online # cat cpuset.cpus 0-1 # cat cpuset.effective_cpus 0-1 And cpuset will bring it back to the effective mask. The implementation is quite straightforward. Instead of calculating the offlined cpus/mems and do updates, we just set the new effective_mask to online_mask & congifured_mask. This is a behavior change for default hierarchy, so legacy hierarchy won't be affected. v2: - make refactoring of cpuset_hotplug_update_tasks() as seperate patch, suggested by Tejun. - make hotplug_update_tasks_insane() use @new_cpus and @new_mems as hotplug_update_tasks_sane() does. Signed-off-by: Li Zefan Signed-off-by: Tejun Heo --- Reading git-diff-tree failed