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,
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
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.
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.
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
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
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:
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:
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
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
---
10 matches
Mail list logo