Re: + fs-bufferc-make-bh_lru_install-more-efficient.patch added to -mm tree

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

 



+Cc linux-fsdevel

On Thu, Jun 01, 2017 at 11:07:19AM -0500, Christoph Lameter wrote:
> On Wed, 31 May 2017, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> 
> > +	struct buffer_head *evictee = bh;
> > +	struct bh_lru *b;
> > +	int i;
> > +	b = this_cpu_ptr(&bh_lrus);
> > +	for (i = 0; i < BH_LRU_SIZE; i++) {
> > +		swap(evictee, b->bhs[i]);
> 
> Could you try to use this_cpu_xchg here to see if it reduces latency
> further?
> 
> for (i = 0; i < BH_LRU_SIZE; i++) {
> 	__this_cpu_xchg(bh_lrus->bhs[i], evictee)
> 
> ...
> 

I tried --- actually, 'evictee = __this_cpu_xchg(bh_lrus.bhs[i], evictee)'.  But
it's much slower, nearly as slow as the original --- which perhaps is not
surprising since __this_cpu_xchg() is a cmpxchg rather than a simple load and
store.  It may be even worse on non-x86 architectures.  Also note that we still
have to disable IRQs because we need to stay on the same CPU throughout so that
only a single queue is operated on.

Eric



[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