linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Fu <fxinrong@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: ebiggers@google.com
Subject: Re: [PATCH] fs/buffer.c: make bh_lru_install() more efficient
Date: Sat, 3 Jun 2017 21:56:36 +0800	[thread overview]
Message-ID: <20170603135634.GA18453@linux-zmni.DHCP> (raw)
In-Reply-To: <20170326033430.GA20915@zzz>

On Sat, Mar 25, 2017 at 08:34:30PM -0700, Eric Biggers wrote:
> On Thu, Dec 29, 2016 at 01:34:45PM -0600, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@google.com>
> > 
> > To install a buffer_head into the cpu's LRU queue, bh_lru_install()
> > would construct a new copy of the queue and then memcpy it over the real
> > queue.  But it's easily possible to do the update in-place, which is
> > faster and simpler.  Some work can also be skipped if the buffer_head
> > was already in the queue.
> > 
> > As a microbenchmark I timed how long it takes to run sb_getblk()
> > 10,000,000 times alternating between BH_LRU_SIZE + 1 blocks.
> > Effectively, this benchmarks looking up buffer_heads that are in the
> > page cache but not in the LRU:
> > 
> > 	Before this patch: 1.758s
> > 	After this patch: 1.653s
> > 
> > This patch also removes about 350 bytes of compiled code (on x86_64),
> > partly due to removal of the memcpy() which was being inlined+unrolled.
> > 
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
> 
> Ping?  Al, do you have any interest in taking this patch?
> 
> - Eric
IMO, It is great patch.
Could you please share your microbenchmark steps?
I wanna take a deep look at it.

      reply	other threads:[~2017-06-03 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-29 19:34 [PATCH] fs/buffer.c: make bh_lru_install() more efficient Eric Biggers
2017-03-26  3:34 ` Eric Biggers
2017-06-03 13:56   ` Sean Fu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170603135634.GA18453@linux-zmni.DHCP \
    --to=fxinrong@gmail.com \
    --cc=ebiggers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).