Messages in this thread | | | Subject | Re: [PATCH v2 06/28] locking/rwlocks: Add contention detection for rwlocks | From | Waiman Long <> | Date | Wed, 10 Feb 2021 10:15:39 -0500 |
| |
On 2/9/21 10:32 PM, Waiman Long wrote: > On 2/2/21 1:57 PM, Ben Gardon wrote: >> 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> >> --- >> include/asm-generic/qrwlock.h | 24 ++++++++++++++++++------ >> include/linux/rwlock.h | 7 +++++++ >> 2 files changed, 25 insertions(+), 6 deletions(-) >> >> diff --git a/include/asm-generic/qrwlock.h >> b/include/asm-generic/qrwlock.h >> index 84ce841ce735..0020d3b820a7 100644 >> --- a/include/asm-generic/qrwlock.h >> +++ b/include/asm-generic/qrwlock.h >> @@ -14,6 +14,7 @@ >> #include <asm/processor.h> >> #include <asm-generic/qrwlock_types.h> >> +#include <asm-generic/qspinlock.h> > > As said in another thread, qspinlock and qrwlock can be independently > enabled for an architecture. So we shouldn't include qspinlock.h here. > Instead, just include the regular linux/spinlock.h file to make sure > that arch_spin_is_locked() is available.
The csky architecture uses qrwlock but not qspinlock. So this patch can be problematic when compiling for csky.
Cheers, Longman
| |