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 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.

For other stuff using them like get_online_cpus() or get_online_mems() I'm
not so sure...

								Honza

-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[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