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: <70273024-d40a-e7bb-740a-629089d169f8@redhat.com>
Date:   Mon, 10 Sep 2018 13:35:53 -0400
From:   Waiman Long <longman@...hat.com>
To:     Davidlohr Bueso <dave@...olabs.net>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Will Deacon <will.deacon@....com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] locking/rwsem: Make owner store task pointer of last
 owning reader

On 09/10/2018 01:15 PM, Davidlohr Bueso wrote:
> On Mon, 10 Sep 2018, Waiman Long wrote:
>
>> One major issue with a combined count/owner is that we may have to use
>> cmpxchg for reader lock which will certainly impact reader-heavy
>> workloads. I have also thought about ways to compress the task pointer
>> address so that it can use fewer bits and leave the rests for reader
>> count. It is probably doable on 64-bit systems, but likely not on 32-bit
>> system given that there are less bits to play around.
>
> Yeah we've discussed this before. As a cleanup it would obviously be
> good,
> but I fear about raw performance loss when using cmpxchg instead of xadd. 

I don't think using cmpxchg for writers will be a performance issue.
However, using cmpxchg for readers will be. One thought that I have is
to use the tid of the writer on the lower half and use the upper half
for reader count. However, there is some overhead in translating tid to
task pointer. So I don't know how useful that may be. So we may still
need to keep the owner field around.

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ