locking/rwlocks: Add contention detection for rwlocks
authorBen Gardon <bgardon@google.com>
Tue, 2 Feb 2021 18:57:12 +0000 (10:57 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2021 10:27:42 +0000 (05:27 -0500)
commit26128cb6c7e6731fe644c687af97733adfdb5ee9
tree2f6ab60c7c1c4c020980b8fe98937915320c74a6
parent7cca2d0b7e7d9f3cd740d41afdc00051c9b508a0
locking/rwlocks: Add contention detection for rwlocks

rwlocks do not currently have any facility to detect contention
like spinlocks do. In order to allow users of rwlocks to better manage
latency, add contention detection for queued rwlocks.

CC: Ingo Molnar <mingo@redhat.com>
CC: Will Deacon <will@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Acked-by: Waiman Long <longman@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20210202185734.1680553-7-bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/asm-generic/qrwlock.h
include/linux/rwlock.h