Skip to content

Commit

Permalink
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  cpusets, hotplug, scheduler: fix scheduler domain breakage
  • Loading branch information
torvalds committed Jul 13, 2008
2 parents 9df2fe9 + 3e84050 commit 3b5c6b8
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,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();

Expand All @@ -1894,7 +1894,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();
}
Expand All @@ -1912,11 +1913,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
Expand All @@ -1929,7 +1941,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

Expand Down

0 comments on commit 3b5c6b8

Please sign in to comment.