From: Max Krasnyansky <maxk@qualcomm.com>
To: Gregory Haskins <ghaskins@novell.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
mingo@elte.hu, dmitry.adamushko@gmail.com,
torvalds@linux-foundation.org, pj@sgi.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and redoscheddomainmanagment (take 2)
Date: Tue, 22 Jul 2008 12:32:03 -0700 [thread overview]
Message-ID: <488635B3.2050606@qualcomm.com> (raw)
In-Reply-To: <4885E952.8020708@novell.com>
Gregory Haskins wrote:
> Max Krasnyansky wrote:
>> Greg, correct me if I'm wrong but we seem to have exact same issue
>> with the rq->rq->online map. Lets take "cpu going down" for
>> example. We're clearing rq->rd->online bit on DYING event, but
>> nothing AFAICS prevents another cpu calling
>> rebuild_sched_domains()->partition_sched_domains() in the middle of
>> the hotplug sequence. partition_sched_domains() will happily reset
>> rd->rq->online mask and things will fail. I'm talking about this
>> path
>>
>> __build_sched_domains() -> cpu_attach_domain() -> rq_attach_root()
>> ...
>> cpu_set(rq->cpu, rd->span);
>> if (cpu_isset(rq->cpu, cpu_online_map))
>> set_rq_online(rq);
>> ...
>>
>>
>
> I think you are right, but wouldn't s/online/active above fix that as
> well? The active_map didnt exist at the time that code went in
> initially ;)
Actually after a bit more thinking :) I realized that the scenario I
explained above cannot happen because partition_sched_domains() must be
called under get_online_cpus() and the set_rq_online() happens in the
hotplug writer's path (ie under cpu_hotplug.lock). Since I unified all
the other domain rebuild paths (arch_reinit_sched_domains, etc) we
should be safe. But it again means we'd rely on those intricate
dependencies that we wanted to avoid with the cpu_active_map. Also
cpusets might still need to rebuild the domains in the hotplug writer's
path.
So it's better to fix it once and for all :)
>> --
>>
>> btw Why didn't we convert sched*.c to use rq->rd->online when it was
>> introduced ? ie Instead of using cpu_online_map directly.
>>
> I think things were converted where they made sense to convert. But we
> also had a different goal at that time, so perhaps something was
> missed. If you think something else should be converted, please point
> it out.
Ok. I'll keep an eye on it.
> In the meantime, I would suggest we consider this patch on top of yours
> (applies to tip/sched/devel):
>
> ----------------------
>
> sched: Fully integrate cpus_active_map and root-domain code
> Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Ack.
The only thing I'm a bit unsure of is the error scenarios in the cpu
hotplug event sequence. online_map is not cleared when something in the
notifier chain fails, but active_map is.
Max
next prev parent reply other threads:[~2008-07-22 19:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 11:43 [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment (take 2) Max Krasnyansky
2008-07-15 11:49 ` Marcel Holtmann
2008-07-15 11:52 ` Peter Zijlstra
2008-07-15 11:57 ` Marcel Holtmann
2008-07-15 12:03 ` Peter Zijlstra
2008-07-15 15:24 ` Linus Torvalds
2008-07-15 12:45 ` Gregory Haskins
2008-07-15 15:22 ` Linus Torvalds
2008-07-16 8:57 ` Dmitry Adamushko
2008-07-16 20:29 ` Max Krasnyansky
2008-07-16 21:55 ` Dmitry Adamushko
2008-07-16 12:12 ` Gregory Haskins
2008-07-16 21:44 ` Max Krasnyansky
2008-07-17 2:51 ` [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redosched " Gregory Haskins
2008-07-17 7:16 ` Max Krasnyansky
2008-07-17 11:57 ` [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redoscheddomain " Gregory Haskins
2008-07-17 18:52 ` Max Krasnyansky
2008-07-17 19:46 ` [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redoscheddomainmanagment " Gregory Haskins
2008-07-18 11:53 ` Peter Zijlstra
2008-07-18 12:22 ` [PATCH] cpu hotplug, sched:Introduce " Gregory Haskins
2008-07-22 5:10 ` Max Krasnyansky
2008-07-22 14:06 ` Gregory Haskins
2008-07-22 14:16 ` Peter Zijlstra
2008-07-22 14:17 ` Gregory Haskins
2008-07-22 14:26 ` Peter Zijlstra
2008-07-22 14:45 ` Gregory Haskins
2008-07-22 19:32 ` Max Krasnyansky [this message]
2008-08-11 13:11 ` Gregory Haskins
2008-08-11 21:57 ` Max Krasnyansky
2008-07-18 11:30 ` [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment " Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=488635B3.2050606@qualcomm.com \
--to=maxk@qualcomm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=dmitry.adamushko@gmail.com \
--cc=ghaskins@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pj@sgi.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.