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]
Message-ID: <8f047351-c53e-ae9a-2d5e-f7c37f6bbdff@redhat.com>
Date:   Wed, 11 May 2022 08:01:24 -0400
From:   Waiman Long <longman@...hat.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>,
        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 5/11/22 03:20, Arnd Bergmann wrote:
> 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

Yes, it is based on the latest tip tree.

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ