Re: [PATCH-tip v2 00/12] locking/rwsem: Rwsem rearchitecture part 2

From: Ingo Molnar
Date: Wed Apr 10 2019 - 06:01:01 EST



* Waiman Long <longman@xxxxxxxxxx> wrote:

> # of Threads Before Patch After Patch
> ------------ ------------ -----------
> 2 1,179 9,436
> 4 1,505 8,268
> 8 721 7,041
> 16 575 7,652
> 32 70 2,189
> 64 39 534
>
> Waiman Long (12):
> locking/rwsem: Implement a new locking scheme
> locking/rwsem: Implement lock handoff to prevent lock starvation
> locking/rwsem: Remove rwsem_wake() wakeup optimization
> locking/rwsem: Make rwsem_spin_on_owner() return owner state
> locking/rwsem: Ensure an RT task will not spin on reader
> locking/rwsem: Wake up almost all readers in wait queue
> locking/rwsem: Enable readers spinning on writer
> locking/rwsem: Enable time-based spinning on reader-owned rwsem
> locking/rwsem: Add more rwsem owner access helpers
> locking/rwsem: Guard against making count negative
> locking/rwsem: Merge owner into count on x86-64
> locking/rwsem: Remove redundant computation of writer lock word
>
> kernel/locking/lock_events_list.h | 4 +
> kernel/locking/rwsem-xadd.c | 635 +++++++++++++++++++-----------
> kernel/locking/rwsem.c | 3 +-
> kernel/locking/rwsem.h | 290 +++++++++++---
> 4 files changed, 647 insertions(+), 285 deletions(-)

Looks very nice!

With both sets of patches applied they pass all x86 tests, but there's
cross-build failures on powerpc32, sparc32 and UML:

kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'

Could you please send a delta patch against tip:WIP.locking/core, which
is the work-in-progress tree? I'll backmerge the delta patch (and any
other updates you might have meanwhil) to the one that introduces the
breakage.

Thanks,

Ingo