Skip to content

locking/rwsem: Rework writer wakeup and handoff

Waiman Long linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest8 patches 3 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8locking/rwsem: Minor code refactoring in rwsem_mark_wake()kernel/locking/rwsem.c+22 -220 replies
2/8locking/rwsem: Enforce queueing when HANDOFFkernel/locking/rwsem.c+9 -00 replies
3/8locking/rwsem: Rework writer wakeupkernel/locking/rwsem.c+123 -1360 replies
4/8locking/rwsem: Simplify rwsem_writer_wake()kernel/locking/rwsem.c+4 -170 replies
5/8locking/rwsem: Split out rwsem_reader_wake()kernel/locking/rwsem.c+46 -370 replies
6/8locking/rwsem: Unify wait loopkernel/locking/rwsem.c+51 -700 replies
7/8locking/rwsem: Use the forcekernel/locking/rwsem.c+29 -40 replies
8/8locking/rwsem: Restore old write lock slow path behaviorkernel/locking/rwsem.c+31 -33 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/8] locking/rwsem: Rework writer wakeup and handoff

This is a followup to the patches in queue.git locking/core branch posted by Peter in [1]. His patch series unified the reader and writer paths as much as possible and making the code a bit easier to maintain. Unfortunately, it did regress performance because it suppress writer lock stealing via optimistic spinning [2].

This series include the 7 patches in his locking/core branch with a minor change to the last one to remove the now unneeded rwsem_wlock_ehandoff event. The last patch in the series restores the old write lock slow path behavior of acquiring the write lock mostly in the slow path which is necessary to restore the performance level back to parity.

[1] https://lore.kernel.org/lkml/Y%[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/

Peter Zijlstra (6):
locking/rwsem: Enforce queueing when HANDOFF
locking/rwsem: Rework writer wakeup
locking/rwsem: Simplify rwsem_writer_wake()
locking/rwsem: Split out rwsem_reader_wake()
locking/rwsem: Unify wait loop
locking/rwsem: Use the force

Waiman Long (2):
locking/rwsem: Minor code refactoring in rwsem_mark_wake() locking/rwsem: Restore old write lock slow path behavior

 kernel/locking/rwsem.c | 466 ++++++++++++++++++++++-------------------
 1 file changed, 246 insertions(+), 220 deletions(-)
Signature · 1 line
2.31.1