Re: [RFC] locking/rwsem: Avoid issuing wakeup before setting the reader waiter to nil

Peter Zijlstra
2018-11-29T22:06:02Z

On Thu, Nov 29, 2018 at 01:34:05PM -0500, Waiman Long wrote:

> That will certainly work for x86. However, I am not sure if that will be
> optimal for arm and powerpc.

smp_mb__before_atomic()
cmpxchg_relaxed()

works. Also see pv_kick_node()'s commit:

34d54f3d6917 ("locking/pvqspinlock: Relax cmpxchg's to improve performance on some architectures")

you might know the author of that :-)