linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Christoph Lameter <cl@linux.com>,
	linux-kernel@vger.kernel.org, Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH] fs/buffer.c: make bh_lru_install() more efficient
Date: Sat, 25 Mar 2017 20:34:30 -0700	[thread overview]
Message-ID: <20170326033430.GA20915@zzz> (raw)
In-Reply-To: <20161229193445.1913-1-ebiggers3@gmail.com>

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

  reply	other threads:[~2017-03-26  3:34 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 [this message]
2017-06-03 13:56   ` Sean Fu

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=20170326033430.GA20915@zzz \
    --to=ebiggers3@gmail.com \
    --cc=cl@linux.com \
    --cc=ebiggers@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).