Skip to content

locking: Adopt relaxed barrier semantics

Davidlohr Bueso lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5asm-generic: Add _{relaxed|acquire|release}() variants for inc/dec atomicsinclude/asm-generic/atomic-long.h include/linux/atomic.h+114 -120 replies
2/5locking/mutex: Relax to atomic/release semanticsinclude/asm-generic/mutex-dec.h include/asm-generic/mutex-xchg.h kernel/locking/mutex.c+14 -132 replies
3/5locking/rtmutex: Relax to acquire/release semanticskernel/locking/rtmutex.c+21 -90 replies
4/5locking/rwsem: Relax to acquire/release semanticsinclude/asm-generic/rwsem.h kernel/locking/rwsem-xadd.c+10 -90 replies
5/5locking/mcs: Relax to atomic/release semanticskernel/locking/mcs_spinlock.h+2 -21 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/5] locking: Adopt relaxed barrier semantics

Hi,

This series continues porting users to Will's new _{acquire|release|relaxed} optimizations for weakly ordered archs -- and in practice, arm64 being the only actual user we have, thus could use a _lot_ more testing. While we have osq in -tip recently, along with Waiman's one for native qspinlock, the following patches pretty much complete the move over for all things kernel/locking/*. Of course, particular primitives can be found in the obvious patch titles. Note that patch 1 adds the necessary machinery to fully support some locks, such as rwsems.

Compiles on x86 and x86-64.

Thanks!

Davidlohr Bueso (5):
asm-generic: Add _{relaxed|acquire|release}() variants for inc/dec
atomics
locking/mutex: Relax to atomic/release semantics locking/rtmutex: Relax to acquire/release semantics locking/rwsem: Relax to acquire/release semantics locking/mcs: Relax to atomic/release semantics

 include/asm-generic/atomic-long.h | 29 +++++++-----
 include/asm-generic/mutex-dec.h   |  8 ++--
 include/asm-generic/mutex-xchg.h  | 10 ++--
 include/asm-generic/rwsem.h       | 14 +++---
 include/linux/atomic.h            | 97 +++++++++++++++++++++++++++++++++++++++
 kernel/locking/mcs_spinlock.h     |  4 +-
 kernel/locking/mutex.c            |  9 ++--
 kernel/locking/rtmutex.c          | 30 ++++++++----
 kernel/locking/rwsem-xadd.c       |  5 +-
 9 files changed, 161 insertions(+), 45 deletions(-)
Signature · 1 line
2.1.4