[PATCH 0/2] locking/rwbase_rt: Use wake_q for lockless reader waker

From: Davidlohr Bueso
Date: Wed Sep 01 2021 - 18:29:27 EST


Hi,

Patch 1 does some necessary code reordering.

Patch 2 introduces wake_up_q_state() and converts rwbase_read_unlock()
slowpath to use wake_q instead of holding the wait_lock across the
entire wakeup.

I have tested equivalent changes in the preempt_rt kernel (v5.14.y-rt)
stressing mmap_sem, without anything falling out.

Thanks!

Davidlohr Bueso (2):
sched: Move wake_q code below try_to_wake_up()
locking/rwbase_rt: Lockless reader waking up a writer

kernel/locking/rwbase_rt.c | 4 +-
kernel/sched/core.c | 182 +++++++++++++++++++------------------
2 files changed, 99 insertions(+), 87 deletions(-)

--
2.26.2