On Wed, Aug 10, 2016 at 08:21:22PM +0200, Manfred Spraul wrote:
4)
spin_unlock_wait() and spin_unlock() pair
http://git.cmpxchg.org/cgit.cgi/linux-mmots.git/tree/ipc/sem.c#n291
http://git.cmpxchg.org/cgit.cgi/linux-mmots.git/tree/ipc/sem.c#n409
The data from the simple op must be observed by the following
complex op. Right now, there is still an smp_rmb() in line 300: The
control barrier from the loop inside spin_unlock_wait() is upgraded
to an acquire barrier by an additional smp_rmb(). Is this smp_rmb()
required? If I understand commit 2c6100227116 ("locking/qspinlock:
Fix spin_unlock_wait() some more") right, with this commit qspinlock
handle this case without the smp_rmb(). What I don't know if powerpc
is using qspinlock already, or if powerpc works without the
smp_rmb(). -- Manfred|