lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 May 2022 09:20:51 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Waiman Long <longman@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>,
        Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] locking/qrwlock: Reduce cacheline contention for
 rwlocks used in interrupt context

On Tue, May 10, 2022 at 9:21 PM Waiman Long <longman@...hat.com> wrote:
>
> Even though qrwlock is supposed to be a fair lock, it does allow readers
> from interrupt context to spin on the lock until it can acquire it making
> it not as fair. This exception was added due to the requirement to allow
> recursive read lock in interrupt context. This can also be achieved by
> just ignoring the writer waiting bit without spinning on the lock.
>
> By making this change, we make qrwlock a bit more fair and eliminating
> the problem of cacheline bouncing for rwlocks that are used heavily in
> interrupt context, like the networking stack. This should also reduce
> the chance of lock starvation for those interrupt context rwlocks.
>
> Signed-off-by: Waiman Long <longman@...hat.com>
> ---
>  include/asm-generic/qrwlock.h |  6 +++---
>  kernel/locking/qrwlock.c      | 17 ++++++-----------
>  2 files changed, 9 insertions(+), 14 deletions(-)

I have no opinion on the change itself, but I made sure this does
not conflict with the generic ticket spinlock changes that I merged
in the asm-generic tree, since those also touch the comments in
qrwlock.h [1]

I assume you are merging both patches through the tip tree, so

Acked-by: Arnd Bergmann <arnd@...db.de> # for asm-generic

If you want me to pick them up in the asm-generic tree instead,
just let me know.

        Arnd

[1] https://lore.kernel.org/lkml/20220509222956.2886-4-palmer@rivosinc.com/

Powered by blists - more mailing lists