From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
rkuo@codeaurora.org, tglx@linutronix.de, linas@codeaurora.org,
mingo@elte.hu, dhowells@redhat.com,
yasutake.koichi@jp.panasonic.com, akpm@linux-foundation.org,
benh@kernel.crashing.org, jesper.nilsson@axis.com,
cmetcalf@tilera.com, linux@arm.linux.org.uk,
jejb@parisc-linux.org, deller@gmx.de, vapier@gentoo.org,
linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-am33-list@redhat.com, linux-parisc@vger.kernel.org
Subject: Re: [PATCH 0/4] arch/CPU hotplug: Add missing CPU Hotplug bits to fix nasty issues
Date: Thu, 22 Mar 2012 14:53:09 +0000 [thread overview]
Message-ID: <1332427989.2946.20.camel@dabdike.int.hansenpartnership.com> (raw)
In-Reply-To: <1332418412.2487.13.camel@twins>
On Thu, 2012-03-22 at 13:13 +0100, Peter Zijlstra wrote:
> On Thu, 2012-03-22 at 16:58 +0530, Srivatsa S. Bhat wrote:
> > Commit 5fbd036b552f633abb394a319f7c62a5c86a9cd7 (sched: Cleanup cpu_active
> > madness) introduced some changes that made the scheduler rely on the
> > CPU_STARTING notifier. And hence those architectures which forgot to
> > send out the CPU_STARTING notification will almost surely get into trouble.
> > (Xen is one example[1]).
>
> The requirement is that CPU_STARTING is ran before set_cpu_online() or
> the open-coded equivalent -- eg. blackfin gets this wrong.
>
> However, it is also required that all this happens while local IRQs are
> still disabled, since the moment we enable IRQs interrupts can happen
> and interrupts can cause wakeups, and wakeups need to have this state
> set up -- blackfin, cris, m32r, mips, sh, sparc64, sparc32, um?, x86 get
> this wrong.
>
> Furthermore, all archs that use CONFIG_USE_GENERIC_SMP_HELPERS should
> hold ipi_call_lock() over setting the cpu online -- alpha, arm, m32r,
> mips, sh, sparc32 seem wrong.
So for parisc, anywhere in smp_callin() should be fine. Our last act on
CPU bringup before going into cpu_idle() is to enable interrupts.
> Furthermore, I was pondering the scenario where a 3rd cpu IPIs the newly
> booting cpu, I suspect we need a smp_wmb() after setting cpu_active and
> a rmb in select_fallback_rq() before reading active.
>
> All in all its a complete friggin trainwreck.
I haven't yet actually tried git head on parisc (and I won't be able to
until I actually get my machines back [currently being shipped across
the atlantic]) but if there's a problem it will show up quickly: parisc
actually uses cpu hotplug to boot its secondary cpus.
James
next prev parent reply other threads:[~2012-03-22 14:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 11:28 Srivatsa S. Bhat
2012-03-22 11:28 ` [PATCH 1/4] hexagon/CPU hotplug: Add missing call to notify_cpu_starting() Srivatsa S. Bhat
2012-04-03 21:09 ` Richard Kuo
2012-03-22 11:28 ` [PATCH 2/4] mn10300/CPU " Srivatsa S. Bhat
2012-03-22 11:28 ` [PATCH 3/4] parisc/CPU " Srivatsa S. Bhat
2012-03-22 11:29 ` [PATCH 4/4] tile/CPU " Srivatsa S. Bhat
2012-04-03 19:48 ` Chris Metcalf
2012-03-22 12:13 ` [PATCH 0/4] arch/CPU hotplug: Add missing CPU Hotplug bits to fix nasty issues Peter Zijlstra
2012-03-22 12:32 ` Peter Zijlstra
2012-03-22 14:53 ` James Bottomley [this message]
2012-03-22 14:55 ` Peter Zijlstra
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=1332427989.2946.20.camel@dabdike.int.hansenpartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=cmetcalf@tilera.com \
--cc=deller@gmx.de \
--cc=dhowells@redhat.com \
--cc=jejb@parisc-linux.org \
--cc=jesper.nilsson@axis.com \
--cc=linas@codeaurora.org \
--cc=linux-am33-list@redhat.com \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@elte.hu \
--cc=rkuo@codeaurora.org \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=vapier@gentoo.org \
--cc=yasutake.koichi@jp.panasonic.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®