Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()
From: Paul E. McKenney <hidden>
Date: 2015-08-17 06:15:13
Also in:
lkml
On Mon, Aug 17, 2015 at 02:06:07PM +1000, Michael Ellerman wrote:
On Wed, 2015-08-12 at 08:43 -0700, Paul E. McKenney wrote:quoted
On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote:quoted
Hello Paul, On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote:quoted
On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote:quoted
On Wed, Jul 15, 2015 at 02:12:21PM +0100, Paul E. McKenney wrote:quoted
quoted
quoted
commit 695c05d4b9666c50b40a1c022678b5f6e2e3e771 Author: Paul E. McKenney [off-list ref] Date: Tue Jul 14 18:35:23 2015 -0700 rcu,locking: Privatize smp_mb__after_unlock_lock() RCU is the only thing that uses smp_mb__after_unlock_lock(), and is likely the only thing that ever will use it, so this commit makes this macro private to RCU. Signed-off-by: Paul E. McKenney [off-list ref] Cc: Will Deacon [off-list ref] Cc: Peter Zijlstra [off-list ref] Cc: Benjamin Herrenschmidt [off-list ref] Cc: "linux-arch@vger.kernel.org" [off-list ref]Are you planning to queue this somewhere? I think it makes sense regardless of whether we change PowerPc or not and ideally it would be merged around the same time as my relaxed atomics series.I have is in -rcu. By default, I will push it to the 4.4 merge window. Please let me know if you need it sooner.The generic relaxed atomics are now queued in -tip, so it would be really good to see this Documentation update land in 4.3 if at all possible. I appreciate it's late in the cycle, but it's always worth asking.Can't hurt to give it a try. I have set -rcu's rcu/next branch to this commit, and if it passes a few day's worth of testing, I will see what Ingo has to say about a pull request. This commit also privatizes smp_mb__after_unlock_lock() as well as updating documentation. Looks like we need to strengthen powerpc's locking primitives, then get rid of smp_mb__after_unlock_lock() entirely. Or did that already happen and I just missed it?No it didn't. I thought the end result of this thread was that we didn't *need* to change the powerpc lock semantics? Or did I read it wrong? ie. the docs now say that RELEASE+ACQUIRE is not a full barrier, which is consistent with our current implementation.
That change happened about 1.5 years ago, and I thought that the current discussion was about reversing it, based in part on the recent powerpc benchmarks of locking primitives with and without the sync instruction. But regardless, I clearly cannot remove either the smp_mb__after_unlock_lock() or the powerpc definition of it to be smp_mb() if powerpc unlock/lock is not strengthened. Thanx, Paul