summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-14 12:19:19 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-14 12:19:19 +0200
commit873a6ed6288b6c2c0d2cc84d3b2bf2fab9ba0181 (patch)
treee0749eee70ce3ca29d62bb3b67248c87a97ec2b7 /kernel
parent361833efac4d277d209008e1e0658e597bc1bdef (diff)
parentbce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff)
downloadblackbird-op-linux-873a6ed6288b6c2c0d2cc84d3b2bf2fab9ba0181.tar.gz
blackbird-op-linux-873a6ed6288b6c2c0d2cc84d3b2bf2fab9ba0181.zip
Merge commit 'v2.6.26' into sched/devel
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cpuset.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 64a05da9bc4c..459d601947a8 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1894,7 +1894,7 @@ static void scan_for_empty_cpusets(const struct cpuset *root)
* in order to minimize text size.
*/
-static void common_cpu_mem_hotplug_unplug(void)
+static void common_cpu_mem_hotplug_unplug(int rebuild_sd)
{
cgroup_lock();
@@ -1906,7 +1906,8 @@ static void common_cpu_mem_hotplug_unplug(void)
* Scheduler destroys domains on hotplug events.
* Rebuild them based on the current settings.
*/
- rebuild_sched_domains();
+ if (rebuild_sd)
+ rebuild_sched_domains();
cgroup_unlock();
}
@@ -1924,11 +1925,22 @@ static void common_cpu_mem_hotplug_unplug(void)
static int cpuset_handle_cpuhp(struct notifier_block *unused_nb,
unsigned long phase, void *unused_cpu)
{
- if (phase == CPU_DYING || phase == CPU_DYING_FROZEN)
+ switch (phase) {
+ case CPU_UP_CANCELED:
+ case CPU_UP_CANCELED_FROZEN:
+ case CPU_DOWN_FAILED:
+ case CPU_DOWN_FAILED_FROZEN:
+ case CPU_ONLINE:
+ case CPU_ONLINE_FROZEN:
+ case CPU_DEAD:
+ case CPU_DEAD_FROZEN:
+ common_cpu_mem_hotplug_unplug(1);
+ break;
+ default:
return NOTIFY_DONE;
+ }
- common_cpu_mem_hotplug_unplug();
- return 0;
+ return NOTIFY_OK;
}
#ifdef CONFIG_MEMORY_HOTPLUG
@@ -1941,7 +1953,7 @@ static int cpuset_handle_cpuhp(struct notifier_block *unused_nb,
void cpuset_track_online_nodes(void)
{
- common_cpu_mem_hotplug_unplug();
+ common_cpu_mem_hotplug_unplug(0);
}
#endif
OpenPOWER on IntegriCloud