Skip to content

locking/qrwlock: get qrwlocks up and running on arm64

Will Deacon linux-arch linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9locking/qrwlock: include <linux/spinlock.h> for arch_spin_{lock,unlock}kernel/locking/qrwlock.c+1 -00 replies
2/9locking/qrwlock: avoid redundant atomic_add_return on read_lock_slowpathkernel/locking/qrwlock.c+2 -16 replies
3/9locking/qrwlock: tidy up rspin_until_writer_unlockkernel/locking/qrwlock.c+10 -100 replies
4/9locking/qrwlock: implement queue_write_unlock using smp_store_releasearch/x86/include/asm/qrwlock.h include/asm-generic/qrwlock.h+1 -181 reply
5/9locking/qrwlock: remove redundant cmpxchg barriers on writer slow-pathkernel/locking/qrwlock.c+5 -12 replies
6/9locking/qrwlock: allow architectures to hook in to contended pathsinclude/asm-generic/qrwlock.h kernel/locking/qrwlock.c+12 -42 replies
7/9locking/qrwlock: expose internal lock structure in qrwlock definitioninclude/asm-generic/qrwlock.h include/asm-generic/qrwlock_types.h kernel/locking/qrwlock.c+19 -260 replies
8/9arm64: cmpxchg: implement cmpxchg_relaxedarch/arm64/include/asm/cmpxchg.h+4 -20 replies
9/9arm64: locking: replace read/write locks with generic qrwlock codearch/arm64/Kconfig arch/arm64/include/asm/qrwlock.h arch/arm64/include/asm/spinlock.h +1 more+33 -1300 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] locking/qrwlock: get qrwlocks up and running on arm64

Hi all,

This patch series gently massages the qrwlock code so as to make it usable on arm64 as a replacement for our current implementation. The last two patches actually do the arch conversion and are included here for reference.

Most of the work is removing redundant memory barriers from the current implementation and adding hooks to the contended paths to allow us to avoid busy-waiting.

Implemented on top of -tip (i.e. the patches queued there from Waiman), but this is likely to conflict with his latest series.

All feedback welcome,

Will

--->8

Will Deacon (9):
locking/qrwlock: include <linux/spinlock.h> for

    arch_spin_{lock,unlock}

locking/qrwlock: avoid redundant atomic_add_return on
read_lock_slowpath
locking/qrwlock: tidy up rspin_until_writer_unlock locking/qrwlock: implement queue_write_unlock using smp_store_release locking/qrwlock: remove redundant cmpxchg barriers on writer slow-path locking/qrwlock: allow architectures to hook in to contended paths locking/qrwlock: expose internal lock structure in qrwlock definition
arm64: cmpxchg: implement cmpxchg_relaxed
arm64: locking: replace read/write locks with generic qrwlock code

 arch/arm64/Kconfig                      |   1 +
 arch/arm64/include/asm/cmpxchg.h        |   6 +-
 arch/arm64/include/asm/qrwlock.h        |  30 ++++++++
 arch/arm64/include/asm/spinlock.h       | 122 +-------------------------------
 arch/arm64/include/asm/spinlock_types.h |  10 +--
 arch/x86/include/asm/qrwlock.h          |  10 ---
 include/asm-generic/qrwlock.h           |  11 ++-
 include/asm-generic/qrwlock_types.h     |  17 ++++-
 kernel/locking/qrwlock.c                |  60 +++++++---------
 9 files changed, 81 insertions(+), 186 deletions(-)
 create mode 100644 arch/arm64/include/asm/qrwlock.h
Signature · 1 line
2.1.4