Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-31 Thread Paul Mackerras
On Thu, Jul 16, 2015 at 03:14:55PM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2015-07-16 at 15:03 +1000, Benjamin Herrenschmidt wrote: > > On Thu, 2015-07-16 at 12:00 +1000, Michael Ellerman wrote: > > > That would fix the problem with smp_mb__after_unlock_lock(), but not > > > the original

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-31 Thread Paul Mackerras
On Thu, Jul 16, 2015 at 03:14:55PM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2015-07-16 at 15:03 +1000, Benjamin Herrenschmidt wrote: > > On Thu, 2015-07-16 at 12:00 +1000, Michael Ellerman wrote: > > > That would fix the problem with smp_mb__after_unlock_lock(), but not > > > the original

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-25 Thread Michael Ellerman
On Tue, 2015-08-25 at 17:27 -0700, Paul E. McKenney wrote: > On Thu, Aug 20, 2015 at 04:56:04PM +0100, Will Deacon wrote: > > On Thu, Aug 20, 2015 at 10:45:05AM +0100, Michael Ellerman wrote: > > > On Tue, 2015-08-18 at 09:37 +0100, Will Deacon wrote: > > > > > > > > Thanks, that sounds great.

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-25 Thread Paul E. McKenney
On Thu, Aug 20, 2015 at 04:56:04PM +0100, Will Deacon wrote: > On Thu, Aug 20, 2015 at 10:45:05AM +0100, Michael Ellerman wrote: > > On Tue, 2015-08-18 at 09:37 +0100, Will Deacon wrote: > > > On Tue, Aug 18, 2015 at 02:50:55AM +0100, Michael Ellerman wrote: > > > > On Mon, 2015-08-17 at 09:57

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-25 Thread Michael Ellerman
On Tue, 2015-08-25 at 17:27 -0700, Paul E. McKenney wrote: On Thu, Aug 20, 2015 at 04:56:04PM +0100, Will Deacon wrote: On Thu, Aug 20, 2015 at 10:45:05AM +0100, Michael Ellerman wrote: On Tue, 2015-08-18 at 09:37 +0100, Will Deacon wrote: Thanks, that sounds great. FWIW, there are

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-25 Thread Paul E. McKenney
On Thu, Aug 20, 2015 at 04:56:04PM +0100, Will Deacon wrote: On Thu, Aug 20, 2015 at 10:45:05AM +0100, Michael Ellerman wrote: On Tue, 2015-08-18 at 09:37 +0100, Will Deacon wrote: On Tue, Aug 18, 2015 at 02:50:55AM +0100, Michael Ellerman wrote: On Mon, 2015-08-17 at 09:57 +0100, Will

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-20 Thread Will Deacon
On Thu, Aug 20, 2015 at 10:45:05AM +0100, Michael Ellerman wrote: > On Tue, 2015-08-18 at 09:37 +0100, Will Deacon wrote: > > On Tue, Aug 18, 2015 at 02:50:55AM +0100, Michael Ellerman wrote: > > > On Mon, 2015-08-17 at 09:57 +0100, Will Deacon wrote: > > > > On Mon, Aug 17, 2015 at 07:15:01AM

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-20 Thread Michael Ellerman
On Tue, 2015-08-18 at 09:37 +0100, Will Deacon wrote: > On Tue, Aug 18, 2015 at 02:50:55AM +0100, Michael Ellerman wrote: > > On Mon, 2015-08-17 at 09:57 +0100, Will Deacon wrote: > > > On Mon, Aug 17, 2015 at 07:15:01AM +0100, Paul E. McKenney wrote: > > > > On Mon, Aug 17, 2015 at 02:06:07PM

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-20 Thread Michael Ellerman
On Tue, 2015-08-18 at 09:37 +0100, Will Deacon wrote: On Tue, Aug 18, 2015 at 02:50:55AM +0100, Michael Ellerman wrote: On Mon, 2015-08-17 at 09:57 +0100, Will Deacon wrote: On Mon, Aug 17, 2015 at 07:15:01AM +0100, Paul E. McKenney wrote: On Mon, Aug 17, 2015 at 02:06:07PM +1000,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-20 Thread Will Deacon
On Thu, Aug 20, 2015 at 10:45:05AM +0100, Michael Ellerman wrote: On Tue, 2015-08-18 at 09:37 +0100, Will Deacon wrote: On Tue, Aug 18, 2015 at 02:50:55AM +0100, Michael Ellerman wrote: On Mon, 2015-08-17 at 09:57 +0100, Will Deacon wrote: On Mon, Aug 17, 2015 at 07:15:01AM +0100, Paul

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-18 Thread Will Deacon
On Tue, Aug 18, 2015 at 02:50:55AM +0100, Michael Ellerman wrote: > On Mon, 2015-08-17 at 09:57 +0100, Will Deacon wrote: > > On Mon, Aug 17, 2015 at 07:15:01AM +0100, Paul E. McKenney wrote: > > > On Mon, Aug 17, 2015 at 02:06:07PM +1000, Michael Ellerman wrote: > > > > On Wed, 2015-08-12 at

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-18 Thread Will Deacon
On Tue, Aug 18, 2015 at 02:50:55AM +0100, Michael Ellerman wrote: On Mon, 2015-08-17 at 09:57 +0100, Will Deacon wrote: On Mon, Aug 17, 2015 at 07:15:01AM +0100, Paul E. McKenney wrote: On Mon, Aug 17, 2015 at 02:06:07PM +1000, Michael Ellerman wrote: On Wed, 2015-08-12 at 08:43 -0700,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-17 Thread Michael Ellerman
On Mon, 2015-08-17 at 09:57 +0100, Will Deacon wrote: > On Mon, Aug 17, 2015 at 07:15:01AM +0100, Paul E. McKenney wrote: > > 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: > > > I thought the end result of this

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-17 Thread Will Deacon
On Mon, Aug 17, 2015 at 07:15:01AM +0100, Paul E. McKenney wrote: > 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: > > > On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: > > > > On Fri, Jul 24, 2015 at

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-17 Thread Paul E. McKenney
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: > > On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: > > > Hello Paul, > > > > > > On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: > > > >

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-17 Thread Will Deacon
On Mon, Aug 17, 2015 at 07:15:01AM +0100, Paul E. McKenney wrote: 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: On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: On Fri, Jul 24, 2015 at 04:30:46PM

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-17 Thread Michael Ellerman
On Mon, 2015-08-17 at 09:57 +0100, Will Deacon wrote: On Mon, Aug 17, 2015 at 07:15:01AM +0100, Paul E. McKenney wrote: 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: I thought the end result of this thread was

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-17 Thread Paul E. McKenney
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: On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: Hello Paul, On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: On Fri, Jul 24,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-16 Thread Michael Ellerman
On Wed, 2015-08-12 at 08:43 -0700, Paul E. McKenney wrote: > On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: > > Hello Paul, > > > > On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: > > > On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: > > > > On Wed,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-16 Thread Michael Ellerman
On Wed, 2015-08-12 at 08:43 -0700, Paul E. McKenney wrote: On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: Hello Paul, On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: On Wed, Jul 15, 2015 at

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-13 Thread Paul E. McKenney
On Thu, Aug 13, 2015 at 11:49:28AM +0100, Will Deacon wrote: > On Wed, Aug 12, 2015 at 06:59:38PM +0100, Paul E. McKenney wrote: > > On Wed, Aug 12, 2015 at 08:43:46AM -0700, Paul E. McKenney wrote: > > > On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: > > > > The generic relaxed

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-13 Thread Will Deacon
On Wed, Aug 12, 2015 at 06:59:38PM +0100, Paul E. McKenney wrote: > On Wed, Aug 12, 2015 at 08:43:46AM -0700, Paul E. McKenney wrote: > > On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: > > > The generic relaxed atomics are now queued in -tip, so it would be really > > > good to see

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-13 Thread Will Deacon
On Wed, Aug 12, 2015 at 06:59:38PM +0100, Paul E. McKenney wrote: On Wed, Aug 12, 2015 at 08:43:46AM -0700, Paul E. McKenney wrote: On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: The generic relaxed atomics are now queued in -tip, so it would be really good to see this

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-13 Thread Paul E. McKenney
On Thu, Aug 13, 2015 at 11:49:28AM +0100, Will Deacon wrote: On Wed, Aug 12, 2015 at 06:59:38PM +0100, Paul E. McKenney wrote: On Wed, Aug 12, 2015 at 08:43:46AM -0700, Paul E. McKenney wrote: On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: The generic relaxed atomics are

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-12 Thread Paul E. McKenney
On Wed, Aug 12, 2015 at 08:43:46AM -0700, Paul E. McKenney wrote: > On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: > > Hello Paul, > > > > On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: > > > On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: > > > > On

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-12 Thread Paul E. McKenney
On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: > Hello Paul, > > On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: > > On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: > > > On Wed, Jul 15, 2015 at 02:12:21PM +0100, Paul E. McKenney wrote: > > > > > >

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-12 Thread Will Deacon
Hello Paul, On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: > On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: > > On Wed, Jul 15, 2015 at 02:12:21PM +0100, Paul E. McKenney wrote: > > > > > commit 695c05d4b9666c50b40a1c022678b5f6e2e3e771 > > > > > Author: Paul E.

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-12 Thread Paul E. McKenney
On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: Hello Paul, On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: On Wed, Jul 15, 2015 at 02:12:21PM +0100, Paul E. McKenney wrote: commit

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-12 Thread Will Deacon
Hello Paul, On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: On Wed, Jul 15, 2015 at 02:12:21PM +0100, Paul E. McKenney wrote: commit 695c05d4b9666c50b40a1c022678b5f6e2e3e771 Author: Paul E. McKenney

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-08-12 Thread Paul E. McKenney
On Wed, Aug 12, 2015 at 08:43:46AM -0700, Paul E. McKenney wrote: On Wed, Aug 12, 2015 at 02:44:15PM +0100, Will Deacon wrote: Hello Paul, On Fri, Jul 24, 2015 at 04:30:46PM +0100, Paul E. McKenney wrote: On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: On Wed, Jul 15,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-24 Thread Paul E. McKenney
On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: > Hi Paul, > > On Wed, Jul 15, 2015 at 02:12:21PM +0100, Paul E. McKenney wrote: > > On Wed, Jul 15, 2015 at 11:51:35AM +0100, Will Deacon wrote: > > > On Wed, Jul 15, 2015 at 02:38:20AM +0100, Paul E. McKenney wrote: > > > > On Tue,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-24 Thread Will Deacon
Hi Paul, On Wed, Jul 15, 2015 at 02:12:21PM +0100, Paul E. McKenney wrote: > On Wed, Jul 15, 2015 at 11:51:35AM +0100, Will Deacon wrote: > > On Wed, Jul 15, 2015 at 02:38:20AM +0100, Paul E. McKenney wrote: > > > On Tue, Jul 14, 2015 at 12:31:44PM -0700, Paul E. McKenney wrote: > > > > On Tue,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-24 Thread Will Deacon
Hi Paul, On Wed, Jul 15, 2015 at 02:12:21PM +0100, Paul E. McKenney wrote: On Wed, Jul 15, 2015 at 11:51:35AM +0100, Will Deacon wrote: On Wed, Jul 15, 2015 at 02:38:20AM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 12:31:44PM -0700, Paul E. McKenney wrote: On Tue, Jul 14,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-24 Thread Paul E. McKenney
On Fri, Jul 24, 2015 at 12:31:01PM +0100, Will Deacon wrote: Hi Paul, On Wed, Jul 15, 2015 at 02:12:21PM +0100, Paul E. McKenney wrote: On Wed, Jul 15, 2015 at 11:51:35AM +0100, Will Deacon wrote: On Wed, Jul 15, 2015 at 02:38:20AM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-22 Thread Will Deacon
On Mon, Jul 20, 2015 at 10:18:14PM +0100, Benjamin Herrenschmidt wrote: > On Mon, 2015-07-20 at 14:39 +0100, Will Deacon wrote: > > On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: > > > On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: > > > > static inline void

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-22 Thread Will Deacon
On Mon, Jul 20, 2015 at 10:18:14PM +0100, Benjamin Herrenschmidt wrote: On Mon, 2015-07-20 at 14:39 +0100, Will Deacon wrote: On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: static inline void

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-20 Thread Benjamin Herrenschmidt
On Mon, 2015-07-20 at 14:39 +0100, Will Deacon wrote: > On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: > > On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: > > > static inline void arch_spin_unlock(arch_spinlock_t *lock) > > > { > > > - SYNC_IO; > > > -

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-20 Thread Will Deacon
On Mon, Jul 20, 2015 at 02:48:49PM +0100, Paul E. McKenney wrote: > On Mon, Jul 20, 2015 at 02:39:06PM +0100, Will Deacon wrote: > > On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: > > > On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: > > > > static inline void

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-20 Thread Paul E. McKenney
On Mon, Jul 20, 2015 at 02:39:06PM +0100, Will Deacon wrote: > On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: > > On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: > > > static inline void arch_spin_unlock(arch_spinlock_t *lock) > > > { > > > - SYNC_IO; > > > -

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-20 Thread Will Deacon
On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: > On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: > > static inline void arch_spin_unlock(arch_spinlock_t *lock) > > { > > - SYNC_IO; > > - __asm__ __volatile__("# arch_spin_unlock\n\t" > > -

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-20 Thread Will Deacon
On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: static inline void arch_spin_unlock(arch_spinlock_t *lock) { - SYNC_IO; - __asm__ __volatile__(# arch_spin_unlock\n\t -

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-20 Thread Paul E. McKenney
On Mon, Jul 20, 2015 at 02:39:06PM +0100, Will Deacon wrote: On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: static inline void arch_spin_unlock(arch_spinlock_t *lock) { - SYNC_IO; - __asm__

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-20 Thread Will Deacon
On Mon, Jul 20, 2015 at 02:48:49PM +0100, Paul E. McKenney wrote: On Mon, Jul 20, 2015 at 02:39:06PM +0100, Will Deacon wrote: On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: static inline void

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-20 Thread Benjamin Herrenschmidt
On Mon, 2015-07-20 at 14:39 +0100, Will Deacon wrote: On Fri, Jul 17, 2015 at 11:14:14PM +0100, Benjamin Herrenschmidt wrote: On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: static inline void arch_spin_unlock(arch_spinlock_t *lock) { - SYNC_IO; - __asm__

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-17 Thread Benjamin Herrenschmidt
On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: > static inline void arch_spin_unlock(arch_spinlock_t *lock) > { > - SYNC_IO; > - __asm__ __volatile__("# arch_spin_unlock\n\t" > - PPC_RELEASE_BARRIER: : :"memory"); > + smp_mb(); >

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-17 Thread Paul E. McKenney
On Fri, Jul 17, 2015 at 12:15:35PM +0200, Peter Zijlstra wrote: > On Fri, Jul 17, 2015 at 10:32:21AM +0100, Will Deacon wrote: > > @@ -158,9 +140,7 @@ void arch_spin_lock_flags(arch_spinlock_t *lock, > > unsigned long flags) > > > > static inline void arch_spin_unlock(arch_spinlock_t *lock) >

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-17 Thread Peter Zijlstra
On Fri, Jul 17, 2015 at 10:32:21AM +0100, Will Deacon wrote: > @@ -158,9 +140,7 @@ void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned > long flags) > > static inline void arch_spin_unlock(arch_spinlock_t *lock) > { > - SYNC_IO; > - __asm__ __volatile__("# arch_spin_unlock\n\t"

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-17 Thread Will Deacon
On Thu, Jul 16, 2015 at 11:54:25PM +0100, Benjamin Herrenschmidt wrote: > On Thu, 2015-07-16 at 08:11 -0700, Paul E. McKenney wrote: > > > So isync in lock in architecturally incorrect, despite being what > > the > > > architecture recommends using, yay ! > > > > Well, the architecture isn't

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-17 Thread Paul E. McKenney
On Fri, Jul 17, 2015 at 12:15:35PM +0200, Peter Zijlstra wrote: On Fri, Jul 17, 2015 at 10:32:21AM +0100, Will Deacon wrote: @@ -158,9 +140,7 @@ void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) static inline void arch_spin_unlock(arch_spinlock_t *lock) { -

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-17 Thread Will Deacon
On Thu, Jul 16, 2015 at 11:54:25PM +0100, Benjamin Herrenschmidt wrote: On Thu, 2015-07-16 at 08:11 -0700, Paul E. McKenney wrote: So isync in lock in architecturally incorrect, despite being what the architecture recommends using, yay ! Well, the architecture isn't expecting that

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-17 Thread Peter Zijlstra
On Fri, Jul 17, 2015 at 10:32:21AM +0100, Will Deacon wrote: @@ -158,9 +140,7 @@ void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) static inline void arch_spin_unlock(arch_spinlock_t *lock) { - SYNC_IO; - __asm__ __volatile__(# arch_spin_unlock\n\t -

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-17 Thread Benjamin Herrenschmidt
On Fri, 2015-07-17 at 10:32 +0100, Will Deacon wrote: static inline void arch_spin_unlock(arch_spinlock_t *lock) { - SYNC_IO; - __asm__ __volatile__(# arch_spin_unlock\n\t - PPC_RELEASE_BARRIER: : :memory); + smp_mb(); lock-slock =

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-16 Thread Benjamin Herrenschmidt
On Thu, 2015-07-16 at 08:11 -0700, Paul E. McKenney wrote: > > So isync in lock in architecturally incorrect, despite being what > the > > architecture recommends using, yay ! > > Well, the architecture isn't expecting that crazies like myself would > want to have an unlock-lock provide ordering

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-16 Thread Paul E. McKenney
On Thu, Jul 16, 2015 at 03:14:55PM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2015-07-16 at 15:03 +1000, Benjamin Herrenschmidt wrote: > > On Thu, 2015-07-16 at 12:00 +1000, Michael Ellerman wrote: > > > That would fix the problem with smp_mb__after_unlock_lock(), but not > > > the original

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-16 Thread Paul E. McKenney
On Thu, Jul 16, 2015 at 03:14:55PM +1000, Benjamin Herrenschmidt wrote: On Thu, 2015-07-16 at 15:03 +1000, Benjamin Herrenschmidt wrote: On Thu, 2015-07-16 at 12:00 +1000, Michael Ellerman wrote: That would fix the problem with smp_mb__after_unlock_lock(), but not the original worry we

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-16 Thread Benjamin Herrenschmidt
On Thu, 2015-07-16 at 08:11 -0700, Paul E. McKenney wrote: So isync in lock in architecturally incorrect, despite being what the architecture recommends using, yay ! Well, the architecture isn't expecting that crazies like myself would want to have an unlock-lock provide ordering to some

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Benjamin Herrenschmidt
On Thu, 2015-07-16 at 15:03 +1000, Benjamin Herrenschmidt wrote: > On Thu, 2015-07-16 at 12:00 +1000, Michael Ellerman wrote: > > That would fix the problem with smp_mb__after_unlock_lock(), but not > > the original worry we had about loads happening before the SC in lock. > > However I think

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Benjamin Herrenschmidt
On Thu, 2015-07-16 at 12:00 +1000, Michael Ellerman wrote: > That would fix the problem with smp_mb__after_unlock_lock(), but not > the original worry we had about loads happening before the SC in lock. However I think isync fixes *that* :-) The problem with isync is as you said, it's not a

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Michael Ellerman
On Wed, 2015-07-15 at 11:44 +0100, Will Deacon wrote: > Hi Michael, > > On Wed, Jul 15, 2015 at 04:06:18AM +0100, Michael Ellerman wrote: > > On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: > > > On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: > > > > This didn't go

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Michael Ellerman
On Wed, 2015-07-15 at 07:18 -0700, Paul E. McKenney wrote: > On Wed, Jul 15, 2015 at 01:06:18PM +1000, Michael Ellerman wrote: > > On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: > > > Michael, at some point you were experimenting a bit with that and tried > > > to get some perf

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Paul E. McKenney
On Wed, Jul 15, 2015 at 01:06:18PM +1000, Michael Ellerman wrote: > On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: > > On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: > > > smp_mb__after_unlock_lock is used to promote an UNLOCK + LOCK sequence > > > into a full memory

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Paul E. McKenney
On Wed, Jul 15, 2015 at 11:51:35AM +0100, Will Deacon wrote: > Hi Paul, > > On Wed, Jul 15, 2015 at 02:38:20AM +0100, Paul E. McKenney wrote: > > On Tue, Jul 14, 2015 at 12:31:44PM -0700, Paul E. McKenney wrote: > > > On Tue, Jul 14, 2015 at 03:12:16PM +0100, Will Deacon wrote: > > > > On Tue,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Will Deacon
Hi Paul, On Wed, Jul 15, 2015 at 02:38:20AM +0100, Paul E. McKenney wrote: > On Tue, Jul 14, 2015 at 12:31:44PM -0700, Paul E. McKenney wrote: > > On Tue, Jul 14, 2015 at 03:12:16PM +0100, Will Deacon wrote: > > > On Tue, Jul 14, 2015 at 03:00:14PM +0100, Paul E. McKenney wrote: > > > > On Tue,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Will Deacon
Hi Michael, On Wed, Jul 15, 2015 at 04:06:18AM +0100, Michael Ellerman wrote: > On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: > > On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: > > > This didn't go anywhere last time I posted it, but here it is again. > > > I'd really

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Benjamin Herrenschmidt
On Thu, 2015-07-16 at 12:00 +1000, Michael Ellerman wrote: That would fix the problem with smp_mb__after_unlock_lock(), but not the original worry we had about loads happening before the SC in lock. However I think isync fixes *that* :-) The problem with isync is as you said, it's not a

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Michael Ellerman
On Wed, 2015-07-15 at 11:44 +0100, Will Deacon wrote: Hi Michael, On Wed, Jul 15, 2015 at 04:06:18AM +0100, Michael Ellerman wrote: On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: This didn't go anywhere last time

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Benjamin Herrenschmidt
On Thu, 2015-07-16 at 15:03 +1000, Benjamin Herrenschmidt wrote: On Thu, 2015-07-16 at 12:00 +1000, Michael Ellerman wrote: That would fix the problem with smp_mb__after_unlock_lock(), but not the original worry we had about loads happening before the SC in lock. However I think isync

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Michael Ellerman
On Wed, 2015-07-15 at 07:18 -0700, Paul E. McKenney wrote: On Wed, Jul 15, 2015 at 01:06:18PM +1000, Michael Ellerman wrote: On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: Michael, at some point you were experimenting a bit with that and tried to get some perf numbers of

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Will Deacon
Hi Paul, On Wed, Jul 15, 2015 at 02:38:20AM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 12:31:44PM -0700, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 03:12:16PM +0100, Will Deacon wrote: On Tue, Jul 14, 2015 at 03:00:14PM +0100, Paul E. McKenney wrote: On Tue, Jul 14,

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Will Deacon
Hi Michael, On Wed, Jul 15, 2015 at 04:06:18AM +0100, Michael Ellerman wrote: On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: This didn't go anywhere last time I posted it, but here it is again. I'd really appreciate

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Paul E. McKenney
On Wed, Jul 15, 2015 at 01:06:18PM +1000, Michael Ellerman wrote: On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: smp_mb__after_unlock_lock is used to promote an UNLOCK + LOCK sequence into a full memory barrier.

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-15 Thread Paul E. McKenney
On Wed, Jul 15, 2015 at 11:51:35AM +0100, Will Deacon wrote: Hi Paul, On Wed, Jul 15, 2015 at 02:38:20AM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 12:31:44PM -0700, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 03:12:16PM +0100, Will Deacon wrote: On Tue, Jul 14, 2015

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Michael Ellerman
On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: > > smp_mb__after_unlock_lock is used to promote an UNLOCK + LOCK sequence > > into a full memory barrier. > > > > However: > > > > - This ordering guarantee is already

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 12:31:44PM -0700, Paul E. McKenney wrote: > On Tue, Jul 14, 2015 at 03:12:16PM +0100, Will Deacon wrote: > > On Tue, Jul 14, 2015 at 03:00:14PM +0100, Paul E. McKenney wrote: > > > On Tue, Jul 14, 2015 at 01:51:46PM +0100, Will Deacon wrote: > > > > On Tue, Jul 14, 2015 at

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 03:12:16PM +0100, Will Deacon wrote: > On Tue, Jul 14, 2015 at 03:00:14PM +0100, Paul E. McKenney wrote: > > On Tue, Jul 14, 2015 at 01:51:46PM +0100, Will Deacon wrote: > > > On Tue, Jul 14, 2015 at 01:45:40PM +0100, Paul E. McKenney wrote: > > > > On Tue, Jul 14, 2015 at

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Will Deacon
On Tue, Jul 14, 2015 at 03:00:14PM +0100, Paul E. McKenney wrote: > On Tue, Jul 14, 2015 at 01:51:46PM +0100, Will Deacon wrote: > > On Tue, Jul 14, 2015 at 01:45:40PM +0100, Paul E. McKenney wrote: > > > On Tue, Jul 14, 2015 at 11:04:29AM +0100, Will Deacon wrote: > > > > Given that RCU is

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 01:51:46PM +0100, Will Deacon wrote: > Hi Paul, > > On Tue, Jul 14, 2015 at 01:45:40PM +0100, Paul E. McKenney wrote: > > On Tue, Jul 14, 2015 at 11:04:29AM +0100, Will Deacon wrote: > > > Given that RCU is currently the only user of this barrier, how would you > > > feel

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Will Deacon
Hi Paul, On Tue, Jul 14, 2015 at 01:45:40PM +0100, Paul E. McKenney wrote: > On Tue, Jul 14, 2015 at 11:04:29AM +0100, Will Deacon wrote: > > Given that RCU is currently the only user of this barrier, how would you > > feel about making the barrier local to RCU and not part of the general > >

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 11:04:29AM +0100, Will Deacon wrote: > On Tue, Jul 14, 2015 at 12:04:06AM +0100, Paul E. McKenney wrote: > > On Tue, Jul 14, 2015 at 12:23:46AM +0200, Peter Zijlstra wrote: > > > If we look at the inside of the critical section again -- similar > > > argument as before: > >

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Will Deacon
On Mon, Jul 13, 2015 at 11:31:29PM +0100, Benjamin Herrenschmidt wrote: > On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: > > This didn't go anywhere last time I posted it, but here it is again. > > I'd really appreciate some feedback from the PowerPC guys, especially as > > to whether this

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Will Deacon
On Tue, Jul 14, 2015 at 12:04:06AM +0100, Paul E. McKenney wrote: > On Tue, Jul 14, 2015 at 12:23:46AM +0200, Peter Zijlstra wrote: > > If we look at the inside of the critical section again -- similar > > argument as before: > > > > *A = a > > smp_mb() > > store M > > load N > >

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Peter Zijlstra
On Tue, Jul 14, 2015 at 08:43:44AM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2015-07-14 at 00:15 +0200, Peter Zijlstra wrote: > > > > This is instead the sequence that is of concern: > > > > > > store a > > > unlock M > > > lock N > > > load b > > > > So its late and that table

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Will Deacon
On Mon, Jul 13, 2015 at 11:31:29PM +0100, Benjamin Herrenschmidt wrote: On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: This didn't go anywhere last time I posted it, but here it is again. I'd really appreciate some feedback from the PowerPC guys, especially as to whether this change

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Peter Zijlstra
On Tue, Jul 14, 2015 at 08:43:44AM +1000, Benjamin Herrenschmidt wrote: On Tue, 2015-07-14 at 00:15 +0200, Peter Zijlstra wrote: This is instead the sequence that is of concern: store a unlock M lock N load b So its late and that table didn't parse, but that

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Will Deacon
On Tue, Jul 14, 2015 at 12:04:06AM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 12:23:46AM +0200, Peter Zijlstra wrote: If we look at the inside of the critical section again -- similar argument as before: *A = a smp_mb() store M load N smp_mb()

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 11:04:29AM +0100, Will Deacon wrote: On Tue, Jul 14, 2015 at 12:04:06AM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 12:23:46AM +0200, Peter Zijlstra wrote: If we look at the inside of the critical section again -- similar argument as before: *A

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Will Deacon
Hi Paul, On Tue, Jul 14, 2015 at 01:45:40PM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 11:04:29AM +0100, Will Deacon wrote: Given that RCU is currently the only user of this barrier, how would you feel about making the barrier local to RCU and not part of the general

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Will Deacon
On Tue, Jul 14, 2015 at 03:00:14PM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 01:51:46PM +0100, Will Deacon wrote: On Tue, Jul 14, 2015 at 01:45:40PM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 11:04:29AM +0100, Will Deacon wrote: Given that RCU is currently the

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 01:51:46PM +0100, Will Deacon wrote: Hi Paul, On Tue, Jul 14, 2015 at 01:45:40PM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 11:04:29AM +0100, Will Deacon wrote: Given that RCU is currently the only user of this barrier, how would you feel about

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 03:12:16PM +0100, Will Deacon wrote: On Tue, Jul 14, 2015 at 03:00:14PM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 01:51:46PM +0100, Will Deacon wrote: On Tue, Jul 14, 2015 at 01:45:40PM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 11:04:29AM

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 12:31:44PM -0700, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 03:12:16PM +0100, Will Deacon wrote: On Tue, Jul 14, 2015 at 03:00:14PM +0100, Paul E. McKenney wrote: On Tue, Jul 14, 2015 at 01:51:46PM +0100, Will Deacon wrote: On Tue, Jul 14, 2015 at 01:45:40PM

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-14 Thread Michael Ellerman
On Tue, 2015-07-14 at 08:31 +1000, Benjamin Herrenschmidt wrote: On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: smp_mb__after_unlock_lock is used to promote an UNLOCK + LOCK sequence into a full memory barrier. However: - This ordering guarantee is already provided without

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-13 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 12:23:46AM +0200, Peter Zijlstra wrote: > On Mon, Jul 13, 2015 at 01:20:32PM -0700, Paul E. McKenney wrote: > > On Mon, Jul 13, 2015 at 06:50:29PM +0100, Will Deacon wrote: > > > > So if I'm following along, smp_mb__after_unlock_lock *does* provide > > > transitivity when

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-13 Thread Paul E. McKenney
On Tue, Jul 14, 2015 at 12:15:03AM +0200, Peter Zijlstra wrote: > On Mon, Jul 13, 2015 at 01:16:42PM -0700, Paul E. McKenney wrote: > > On Mon, Jul 13, 2015 at 03:41:53PM -0400, Peter Hurley wrote: > > > > Does that answer the question, or am I missing the point? > > > > > > Yes, it shows that

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-13 Thread Benjamin Herrenschmidt
On Tue, 2015-07-14 at 00:15 +0200, Peter Zijlstra wrote: > > This is instead the sequence that is of concern: > > > > store a > > unlock M > > lock N > > load b > > So its late and that table didn't parse, but that should be ordered too. > The load of b should not be able to

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-13 Thread Benjamin Herrenschmidt
On Mon, 2015-07-13 at 17:54 +0200, Peter Zijlstra wrote: > That said, I don't think this could even happen on PPC because we have > load_acquire and store_release, this means that: > > *A = a > lwsync > store_release M > load_acquire N > lwsync > *B = b > >

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-13 Thread Benjamin Herrenschmidt
On Mon, 2015-07-13 at 13:15 +0100, Will Deacon wrote: > smp_mb__after_unlock_lock is used to promote an UNLOCK + LOCK sequence > into a full memory barrier. > > However: > > - This ordering guarantee is already provided without the barrier on > all architectures apart from PowerPC > > -

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-13 Thread Peter Zijlstra
On Mon, Jul 13, 2015 at 01:20:32PM -0700, Paul E. McKenney wrote: > On Mon, Jul 13, 2015 at 06:50:29PM +0100, Will Deacon wrote: > > So if I'm following along, smp_mb__after_unlock_lock *does* provide > > transitivity when used with UNLOCK + LOCK, which is stronger than your > > example here. >

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-13 Thread Peter Zijlstra
On Mon, Jul 13, 2015 at 01:16:42PM -0700, Paul E. McKenney wrote: > On Mon, Jul 13, 2015 at 03:41:53PM -0400, Peter Hurley wrote: > > > Does that answer the question, or am I missing the point? > > > > Yes, it shows that smp_mb__after_unlock_lock() has no purpose, since it > > is defined only for

Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock()

2015-07-13 Thread Paul E. McKenney
On Mon, Jul 13, 2015 at 06:50:29PM +0100, Will Deacon wrote: > On Mon, Jul 13, 2015 at 04:54:47PM +0100, Peter Zijlstra wrote: > > However I think we should look at the insides of the critical sections; > > for example (from Documentation/memory-barriers.txt): > > > > " *A = a; > >

  1   2   >