diff options
author | Waiman Long <longman@redhat.com> | 2022-03-22 18:20:59 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-04-05 11:24:35 +0300 |
commit | 1ee326196c66583006b0c95356a4b7dc51bf3531 (patch) | |
tree | f9b36797a5eb085882caa15616daa89a81c09025 /include/trace | |
parent | 54c1ee4d614d52844cf24c46d8415bf1392021d0 (diff) | |
download | linux-1ee326196c66583006b0c95356a4b7dc51bf3531.tar.xz |
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 'include/trace')
0 files changed, 0 insertions, 0 deletions