Skip to content

Implement ticket spinlocks for ARM

Will Deacon linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ARM: spinlock: use ticket algorithm for ARMv6+ locking implementationarch/arm/include/asm/spinlock.h arch/arm/include/asm/spinlock_types.h+64 -261 reply
1/2ARM: spinlock: use ticket algorithm for ARMv6+ locking implementation+0 -00 replies
2/2ARM: rwlocks: remove unused branch labels from trylock routinesarch/arm/include/asm/spinlock.h+2 -21 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchNicolas Pitre
1/2R-b
1/2R-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Implement ticket spinlocks for ARM

Hello,

With multi-cluster ARM platforms on the horizon, our current spinlock implementation can result in lock-bias when the memory latency is not uniform between clusters. This may be due to microarchitectural constraints or (mis-)configuration of the cache-coherent interconnect.

This series ensures lock fairness by implementing the ticket algorithm described in detail here:

        http://lwn.net/Articles/267968/

Whilst fairness is not necessarily congruent with throughput, I've not observed any drop in performance on single-cluster systems with this change to the kernel (I ran hackbench, which stresses &(&u->lock)->rlock on the msg{snd,rcv} paths).

All comments welcome,

Will

Will Deacon (2):
ARM: spinlock: use ticket algorithm for ARMv6+ locking implementation
ARM: rwlocks: remove unused branch labels from trylock routines

 arch/arm/include/asm/spinlock.h       |   77 ++++++++++++++++++++++-----------
 arch/arm/include/asm/spinlock_types.h |   17 ++++++-
 2 files changed, 66 insertions(+), 28 deletions(-)
Signature · 1 line
1.7.4.1