diff options
author | Gregory Haskins <ghaskins@novell.com> | 2008-03-10 17:59:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-03-11 09:02:58 -0400 |
commit | 08f503b0c089968b2542659a89dfd50c5c59bb0b (patch) | |
tree | 0a88cc425c2c213a2e6384f4df0739e2e8485e8f /kernel | |
parent | 1f94ef598e8d29b92b9fc85d43c832e03721d3cb (diff) |
keep rd->online and cpu_online_map in sync
It is possible to allow the root-domain cache of online cpus to
become out of sync with the global cpu_online_map. This is because we
currently trigger removal of cpus too early in the notifier chain.
Other DOWN_PREPARE handlers may in fact run and reconfigure the
root-domain topology, thereby stomping on our own offline handling.
The end result is that rd->online may become out of sync with
cpu_online_map, which results in potential task misrouting.
So change the offline handling to be more tightly coupled with the
global offline process by triggering on CPU_DYING intead of
CPU_DOWN_PREPARE.
Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 52b98675acb2..1cb53fb1fe3d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5881,7 +5881,8 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
5881 | spin_unlock_irq(&rq->lock); | 5881 | spin_unlock_irq(&rq->lock); |
5882 | break; | 5882 | break; |
5883 | 5883 | ||
5884 | case CPU_DOWN_PREPARE: | 5884 | case CPU_DYING: |
5885 | case CPU_DYING_FROZEN: | ||
5885 | /* Update our root-domain */ | 5886 | /* Update our root-domain */ |
5886 | rq = cpu_rq(cpu); | 5887 | rq = cpu_rq(cpu); |
5887 | spin_lock_irqsave(&rq->lock, flags); | 5888 | spin_lock_irqsave(&rq->lock, flags); |