[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200918130914.GA26777@redhat.com>
Date: Fri, 18 Sep 2020 15:09:14 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: peterz@...radead.org
Cc: Jan Kara <jack@...e.cz>, 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 09/18, Peter Zijlstra wrote:
>
> On Fri, Sep 18, 2020 at 12:48:24PM +0200, Oleg Nesterov wrote:
>
> > Of course, this assumes that atomic_t->counter underflows "correctly", just
> > like "unsigned int".
>
> We're documented that we do. Lots of code relies on that.
>
> See Documentation/atomic_t.txt TYPES
Aha, thanks!
> > 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.
Oleg.
Powered by blists - more mailing lists