aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2012-05-24 10:16:55 -0400
committerIngo Molnar <mingo@kernel.org>2012-07-24 07:53:22 -0400
commit7ddf96b02fe8dd441f452deef879040def5f7b34 (patch)
tree779a01bad0b51eb8ca8acb96b75f5a1b06f9a6d3 /kernel/sched
parent80d1fa6463d934969b7aebf04107fc133463f0f6 (diff)
cpusets, hotplug: Restructure functions that are invoked during hotplug
Separate out the cpuset related handling for CPU/Memory online/offline. This also helps us exploit the most obvious and basic level of optimization that any notification mechanism (CPU/Mem online/offline) has to offer us: "We *know* why we have been invoked. So stop pretending that we are lost, and do only the necessary amount of processing!". And while at it, rename scan_for_empty_cpusets() to scan_cpusets_upon_hotplug(), which is more appropriate considering how it is restructured. Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20120524141650.3692.48637.stgit@srivatsabhat.in.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4c1d80c6b318..4b4a63d34396 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7134,7 +7134,7 @@ static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action,
7134 7134
7135 case CPU_ONLINE: 7135 case CPU_ONLINE:
7136 case CPU_DOWN_FAILED: 7136 case CPU_DOWN_FAILED:
7137 cpuset_update_active_cpus(); 7137 cpuset_update_active_cpus(true);
7138 break; 7138 break;
7139 default: 7139 default:
7140 return NOTIFY_DONE; 7140 return NOTIFY_DONE;
@@ -7147,7 +7147,7 @@ static int cpuset_cpu_inactive(struct notifier_block *nfb, unsigned long action,
7147{ 7147{
7148 switch (action) { 7148 switch (action) {
7149 case CPU_DOWN_PREPARE: 7149 case CPU_DOWN_PREPARE:
7150 cpuset_update_active_cpus(); 7150 cpuset_update_active_cpus(false);
7151 break; 7151 break;
7152 case CPU_DOWN_PREPARE_FROZEN: 7152 case CPU_DOWN_PREPARE_FROZEN:
7153 num_cpus_frozen++; 7153 num_cpus_frozen++;