[PATCH 02/10] locking/qspinlock: Remove unbounded cmpxchg loop from locking slowpath

Peter Zijlstra peterz at infradead.org
Sat Apr 7 01:47:32 PDT 2018


On Fri, Apr 06, 2018 at 02:09:53PM -0700, Paul E. McKenney wrote:
> It would indeed be good to not be in the position of having to trade off
> forward-progress guarantees against performance, but that does appear to
> be where we are at the moment.

Depends of course on how unfair cmpxchg is. On x86 we trade one cmpxchg
loop for another so the patch doesn't cure anything at all there. And
our cmpxchg has 'some' hardware fairness to it.

So while the patch is 'good' for platforms that have native fetch-or,
it doesn't help (or in our case even hurts) those that do not.



More information about the linux-arm-kernel mailing list