[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080310215813.10968.960.stgit@novell1.haskins.net>
Date: Mon, 10 Mar 2008 17:59:11 -0400
From: Gregory Haskins <ghaskins@...ell.com>
To: suresh.b.siddha@...el.com
Cc: ego@...ibm.com, rjw@...k.pl, akpm@...ux-foundation.org,
dmitry.adamushko@...il.com, ego@...ibm.com, mingo@...e.hu,
oleg@...sign.ru, yi.y.yang@...el.com, linux-kernel@...r.kernel.org,
tglx@...utronix.de, ghaskins@...ell.com
Subject: [PATCH v2] keep rd->online and cpu_online_map in sync
>>> On Mon, Mar 10, 2008 at 6:10 PM, in message
<20080310221014.GB27329@...ux-os.sc.intel.com>, Suresh Siddha
<suresh.b.siddha@...el.com> wrote:
> On Mon, Mar 10, 2008 at 04:00:28PM -0600, Gregory Haskins wrote:
>> >>> On Mon, Mar 10, 2008 at 6:03 PM, in message
> <200803102303.28660.rjw@...k.pl>,
>> "Rafael J. Wysocki" <rjw@...k.pl> wrote:
>> > On Monday, 10 of March 2008, Suresh Siddha wrote:
>> >> >
>> >> > - case CPU_DOWN_PREPARE:
>> >> > + case CPU_DYING:
>> >>
>> >> Don't we need to take care of CPU_DYING_FROZEN aswell?
>> >
>> > Well, I'd say we do.
>>
>> Should I add that to the patch as well then?
>
> Yes please.
Here is v2 with the suggested improvement
-Greg
------------------------
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@...ell.com>
Cc: Gautham R Shenoy <ego@...ibm.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@...el.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Andrew Morton <akpm@...ux-foundation.org>
---
kernel/sched.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 52b9867..1cb53fb 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5881,7 +5881,8 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
spin_unlock_irq(&rq->lock);
break;
- case CPU_DOWN_PREPARE:
+ case CPU_DYING:
+ case CPU_DYING_FROZEN:
/* Update our root-domain */
rq = cpu_rq(cpu);
spin_lock_irqsave(&rq->lock, flags);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists