Re: [RFC PATCH] locking/percpu-rwsem: use this_cpu_{inc|dec}() for read_count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux