summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorWaiman Long <longman@redhat.com>2022-03-22 18:20:58 +0300
committerPeter Zijlstra <peterz@infradead.org>2022-04-05 11:24:35 +0300
commit54c1ee4d614d52844cf24c46d8415bf1392021d0 (patch)
tree3611f9ad3f48204ed7581fd53597afade07eb21f /include/trace
parentf9e21aa9e6fb11355e54c8949a390d49ca21cde1 (diff)
downloadlinux-54c1ee4d614d52844cf24c46d8415bf1392021d0.tar.xz
locking/rwsem: Conditionally wake waiters in reader/writer slowpaths
In an analysis of a recent vmcore, a reader-owned rwsem was found with 385 readers but no writer in the wait queue. That is kind of unusual but it may be caused by some race conditions that we have not fully understood yet. In such a case, all the readers in the wait queue should join the other reader-owners and acquire the read lock. In rwsem_down_write_slowpath(), an incoming writer will try to wake up the front readers under such circumstance. That is not the case for rwsem_down_read_slowpath(), add a new helper function rwsem_cond_wake_waiter() to do wakeup and use it in both reader and writer slowpaths to have a consistent and correct behavior. 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-3-longman@redhat.com
Diffstat (limited to 'include/trace')
0 files changed, 0 insertions, 0 deletions