From: Nicholas Piggin <npiggin@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
torvalds@linux-foundation.org, will.deacon@arm.com,
oleg@redhat.com, paulmck@linux.vnet.ibm.com,
benh@kernel.crashing.org, linux-kernel@vger.kernel.org,
mingo@kernel.org, stern@rowland.harvard.edu,
linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch
Date: Thu, 8 Jun 2017 23:18:13 +1000 [thread overview]
Message-ID: <20170608231813.7fdac022@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20170608124540.olt2rv3nbnd45pxr@hirez.programming.kicks-ass.net>
On Thu, 8 Jun 2017 14:45:40 +0200
Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, Jun 08, 2017 at 08:00:15PM +1000, Nicholas Piggin wrote:
>
> > I have those, I just also would like one in the core scheduler's use
> > of smp_mb__after_spinlock(), because it would be easy for core scheduler
> > change to miss that quirk. Sure we can say that Peter and scheduler
> > maintainers know about powerpc oddities, but then why shouldn't it also
> > go into a comment there?
>
> So the core scheduler guarantees smp_mb() or equivalent full transitive
> ordering happens at schedule() time.
>
> It has for a fairly long time and I don't think we'll ever get rid of
> that, its fairly fundamental.
>
> PPC is special in that smp_mb() ends up being the strongest ordering
> primitive there is. But note that PPC is not unique, afaict Alpha is in
> the same boat. They rely on the MB from the scheduler core.
>
> IA64 OTOH, while they have smp_mb() == mb() still needs SYNC.I in
> __switch_to() to serialize against (instruction) cache flushes.
>
> So while I'm all for adding comments explaining what the core provides,
> I don't see immediate reasons to call out PPC.
I guess I see your point... okay, will constrain the comment to powerpc
context switch and primitives code. Any fundamental change to such
scheduler barriers I guess would require at least a glance over arch
switch code :)
My plan is to send the powerpc sync removal patch for hopefully 4.13
merge. I'm pretty sure it will be equally happy with your patches.
Unless you can see any problems with it? More eyes would be welcome.
Thanks,
Nick
next prev parent reply other threads:[~2017-06-08 13:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170607161501.819948352@infradead.org>
[not found] ` <20170607162013.905320602@infradead.org>
[not found] ` <20170608103244.1b4b24c9@roar.ozlabs.ibm.com>
[not found] ` <20170608065400.zhfao5lba6i3s7j6@hirez.programming.kicks-ass.net>
2017-06-08 7:29 ` [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch Nicholas Piggin
2017-06-08 7:57 ` Peter Zijlstra
2017-06-08 8:21 ` Nicholas Piggin
2017-06-08 9:54 ` Michael Ellerman
2017-06-08 10:00 ` Nicholas Piggin
2017-06-08 12:45 ` Peter Zijlstra
2017-06-08 13:18 ` Nicholas Piggin [this message]
2017-06-08 13:47 ` 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=20170608231813.7fdac022@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.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;
as well as URLs for NNTP newsgroup(s).