From: Nicholas Piggin <npiggin@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: torvalds@linux-foundation.org, will.deacon@arm.com,
oleg@redhat.com, paulmck@linux.vnet.ibm.com,
benh@kernel.crashing.org, mpe@ellerman.id.au,
linux-kernel@vger.kernel.org, mingo@kernel.org,
stern@rowland.harvard.edu
Subject: Re: [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch
Date: Thu, 8 Jun 2017 10:32:44 +1000 [thread overview]
Message-ID: <20170608103244.1b4b24c9@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20170607162013.905320602@infradead.org>
On Wed, 07 Jun 2017 18:15:06 +0200
Peter Zijlstra <peterz@infradead.org> wrote:
> Now that the scheduler's rq->lock is RCsc and thus provides full
> transitivity between scheduling actions. And since we cannot migrate
> current, a task needs a switch-out and a switch-in in order to
> migrate, in which case the RCsc provides all the ordering we need.
Hi Peter,
I'm actually just working on removing this right now too, so
good timing.
I think we can't "just" remove it, because it is required to order
MMIO on powerpc as well.
But what I have done is to comment that some other primitives are
already providing the hwsync for other, so we don't have to add
another one in _switch.
Thanks,
Nick
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> arch/powerpc/kernel/entry_64.S | 8 --------
> 1 file changed, 8 deletions(-)
>
> --- a/arch/powerpc/kernel/entry_64.S
> +++ b/arch/powerpc/kernel/entry_64.S
> @@ -488,14 +488,6 @@ _GLOBAL(_switch)
> std r23,_CCR(r1)
> std r1,KSP(r3) /* Set old stack pointer */
>
> -#ifdef CONFIG_SMP
> - /* We need a sync somewhere here to make sure that if the
> - * previous task gets rescheduled on another CPU, it sees all
> - * stores it has performed on this one.
> - */
> - sync
> -#endif /* CONFIG_SMP */
> -
> /*
> * If we optimise away the clear of the reservation in system
> * calls because we know the CPU tracks the address of the
>
>
next prev parent reply other threads:[~2017-06-08 0:33 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 16:15 [RFC][PATCH 0/5] Getting rid of smp_mb__before_spinlock Peter Zijlstra
2017-06-07 16:15 ` [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra
2017-06-09 14:45 ` Will Deacon
2017-06-09 18:42 ` Peter Zijlstra
2017-07-28 17:45 ` Peter Zijlstra
2017-08-01 10:31 ` Will Deacon
2017-08-01 12:02 ` Benjamin Herrenschmidt
2017-08-01 12:14 ` Peter Zijlstra
2017-08-01 16:39 ` Peter Zijlstra
2017-08-01 16:44 ` Will Deacon
2017-08-01 16:48 ` Peter Zijlstra
2017-08-01 22:59 ` Peter Zijlstra
2017-08-02 1:23 ` Benjamin Herrenschmidt
2017-08-02 8:11 ` Peter Zijlstra
2017-08-02 8:15 ` Will Deacon
2017-08-02 8:43 ` Will Deacon
2017-08-02 8:51 ` Peter Zijlstra
2017-08-02 9:02 ` Will Deacon
2017-08-02 22:54 ` Benjamin Herrenschmidt
2017-08-02 8:45 ` Peter Zijlstra
2017-08-02 9:02 ` Will Deacon
2017-08-02 9:18 ` Peter Zijlstra
2017-08-02 13:57 ` Benjamin Herrenschmidt
2017-08-02 15:46 ` Peter Zijlstra
2017-08-02 0:17 ` Benjamin Herrenschmidt
2017-08-01 22:42 ` Benjamin Herrenschmidt
2017-06-07 16:15 ` [RFC][PATCH 2/5] locking: Introduce smp_mb__after_spinlock() Peter Zijlstra
2017-06-07 16:15 ` [RFC][PATCH 3/5] overlayfs: Remove smp_mb__before_spinlock() usage Peter Zijlstra
2017-06-07 16:15 ` [RFC][PATCH 4/5] locking: Remove smp_mb__before_spinlock() Peter Zijlstra
2017-06-07 16:15 ` [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch Peter Zijlstra
2017-06-08 0:32 ` Nicholas Piggin [this message]
2017-06-08 6:54 ` Peter Zijlstra
2017-06-08 7:29 ` 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
2017-06-08 13:47 ` Peter Zijlstra
2017-06-09 14:49 ` [RFC][PATCH 0/5] Getting rid of smp_mb__before_spinlock Will Deacon
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=20170608103244.1b4b24c9@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®