Re: [PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread Manfred Spraul
On 08/28/2016 03:43 PM, Paul E. McKenney wrote: Without the smp_mb__after_unlock_lock(), other CPUs can observe the write to d without seeing the write to a. Signed-off-by: Manfred Spraul With the upgraded commit log, I am OK with the patch below. Done. However,

Re: [PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread Manfred Spraul
On 08/28/2016 03:43 PM, Paul E. McKenney wrote: Without the smp_mb__after_unlock_lock(), other CPUs can observe the write to d without seeing the write to a. Signed-off-by: Manfred Spraul With the upgraded commit log, I am OK with the patch below. Done. However, others will probably want

[PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread Manfred Spraul
spin_unlock() + spin_lock() together do not form a full memory barrier: (everything initialized to 0) CPU1: a=1; spin_unlock(); spin_lock(); + smp_mb__after_unlock_lock(); r1=d; CPU2: d=1; smp_mb(); r2=a; Without the smp_mb__after_unlock_lock(), r1==0 && r2==0 would be possible.

[PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread Manfred Spraul
spin_unlock() + spin_lock() together do not form a full memory barrier: (everything initialized to 0) CPU1: a=1; spin_unlock(); spin_lock(); + smp_mb__after_unlock_lock(); r1=d; CPU2: d=1; smp_mb(); r2=a; Without the smp_mb__after_unlock_lock(), r1==0 && r2==0 would be possible.

Re: [PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread kbuild test robot
Hi Manfred, [auto build test ERROR on next-20160825] [cannot apply to tip/locking/core linus/master linux/master v4.8-rc3 v4.8-rc2 v4.8-rc1 v4.8-rc3] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch

Re: [PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread kbuild test robot
Hi Manfred, [auto build test ERROR on next-20160825] [cannot apply to tip/locking/core linus/master linux/master v4.8-rc3 v4.8-rc2 v4.8-rc1 v4.8-rc3] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch

Re: [PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread Paul E. McKenney
On Sun, Aug 28, 2016 at 01:56:14PM +0200, Manfred Spraul wrote: > spin_unlock() + spin_lock() together do not form a full memory barrier: > > a=1; > spin_unlock(); > spin_lock(); > + smp_mb__after_unlock_lock(); > d=1; Better would be s/d=1/r1=d/ above. Then another process doing this:

Re: [PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread Paul E. McKenney
On Sun, Aug 28, 2016 at 01:56:14PM +0200, Manfred Spraul wrote: > spin_unlock() + spin_lock() together do not form a full memory barrier: > > a=1; > spin_unlock(); > spin_lock(); > + smp_mb__after_unlock_lock(); > d=1; Better would be s/d=1/r1=d/ above. Then another process doing this:

[PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread Manfred Spraul
spin_unlock() + spin_lock() together do not form a full memory barrier: a=1; spin_unlock(); spin_lock(); + smp_mb__after_unlock_lock(); d=1; Without the smp_mb__after_unlock_lock(), other CPUs can observe the write to d without seeing the write to a. Signed-off-by: Manfred Spraul

[PATCH 2/4] barrier.h: Move smp_mb__after_unlock_lock to barrier.h

2016-08-28 Thread Manfred Spraul
spin_unlock() + spin_lock() together do not form a full memory barrier: a=1; spin_unlock(); spin_lock(); + smp_mb__after_unlock_lock(); d=1; Without the smp_mb__after_unlock_lock(), other CPUs can observe the write to d without seeing the write to a. Signed-off-by: Manfred Spraul ---