summaryrefslogtreecommitdiff
path: root/kernel/locking/lockdep.c
diff options
context:
space:
mode:
authorWaiman Long <longman@redhat.com>2022-03-22 11:20:59 -0400
committerPeter Zijlstra <peterz@infradead.org>2022-04-05 10:24:35 +0200
commit1ee326196c66583006b0c95356a4b7dc51bf3531 (patch)
treef9b36797a5eb085882caa15616daa89a81c09025 /kernel/locking/lockdep.c
parent54c1ee4d614d52844cf24c46d8415bf1392021d0 (diff)
locking/rwsem: Always try to wake waiters in out_nolock path
For writers, the out_nolock path will always attempt to wake up waiters. This may not be really necessary if the waiter to be removed is not the first one. For readers, no attempt to wake up waiter is being made. However, if the HANDOFF bit is set and the reader to be removed is the first waiter, the waiter behind it will inherit the HANDOFF bit and for a write lock waiter waking it up will allow it to spin on the lock to acquire it faster. So it can be beneficial to do a wakeup in this case. Add a new rwsem_del_wake_waiter() helper function to do that consistently for both reader and writer out_nolock paths. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20220322152059.2182333-4-longman@redhat.com
Diffstat (limited to 'kernel/locking/lockdep.c')
0 files changed, 0 insertions, 0 deletions