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:   Mon, 21 Sep 2020 09:49:54 +1000
From:   Dave Chinner <david@...morbit.com>
To:     Jan Kara <jack@...e.cz>
Cc:     Oleg Nesterov <oleg@...hat.com>, peterz@...radead.org,
        Boaz Harrosh <boaz@...xistor.com>,
        Hou Tao <houtao1@...wei.com>, Ingo Molnar <mingo@...hat.com>,
        Will Deacon <will@...nel.org>, Dennis Zhou <dennis@...nel.org>,
        Tejun Heo <tj@...nel.org>, Christoph Lameter <cl@...ux.com>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [RFC PATCH] locking/percpu-rwsem: use this_cpu_{inc|dec}() for
 read_count

On Fri, Sep 18, 2020 at 03:26:35PM +0200, Jan Kara wrote:
> On Fri 18-09-20 15:09:14, Oleg Nesterov wrote:
> > On 09/18, Peter Zijlstra wrote:
> > > > But again, do we really want this?
> > >
> > > I like the two counters better, avoids atomics entirely, some archs
> > > hare horridly expensive atomics (*cough* power *cough*).
> > 
> > I meant... do we really want to introduce percpu_up_read_irqsafe() ?
> > 
> > Perhaps we can live with the fix from Hou? At least until we find a
> > "real" performance regression.
> 
> I can say that for users of percpu rwsem in filesystems the cost of atomic
> inc/dec is unlikely to matter. The lock hold times there are long enough
> that it would be just lost in the noise.

I'm not sure that is correct. We do an inc/dec pair per AIO, so if
we are running millions of IOPS through the AIO subsystem, then the
cost of doing millions of extra atomic ops every second is going to
be noticable...

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ