linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 5/6] libext2fs/e2fsck: provide routines to read-ahead metadata
Date: Mon, 11 Aug 2014 11:05:09 -0700	[thread overview]
Message-ID: <20140811180509.GE2808@birch.djwong.org> (raw)
In-Reply-To: <20140811143423.GB3506@thunk.org>

On Mon, Aug 11, 2014 at 10:34:23AM -0400, Theodore Ts'o wrote:
> On Sun, Aug 10, 2014 at 11:31:20PM -0700, Darrick J. Wong wrote:
> > 
> > Hmm, I'll try that, though I'm almost tempted just to issue io_cache_readahead
> > calls directly from the for loop.  The only reason I'm using the list here at
> > all is to handle the case of reading multiple groups in a flexbg (pass5 RA).
> 
> In that case you could just use an accumulator for each of the block
> and inode bitmaps, and so long as the next group's block and inode
> bitmaps are contiguous with the previous one, you can bump a counter.
> Once you reach a discontiguous bitmap block, you can issue a single
> readahead request for N blocks starting at block B.  That way you only
> issue a single syscall, instead of one for every single block, and you
> don't have the overhead involved with storing the list of blocks and
> then sorting them.

Using the bitmap turns out to be pretty quick (~130us to start RA for 4 groups
vs. ~70us per group if I issue the RA directly).  Each fadvise call seems to
cost us ~1ms, so I'll keep using the bitmap to minimize the number of fadvise
calls, since it's also a lot less code.

--D

> 
> 					- Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-08-11 18:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-09  4:26 [PATCH 0/6] e2fsprogs Summer 2014 patchbomb, part 5 Darrick J. Wong
2014-08-09  4:26 ` [PATCH 1/6] libext2fs: create inlinedata symlinks Darrick J. Wong
2014-08-24 16:15   ` Theodore Ts'o
2014-08-09  4:26 ` [PATCH 2/6] misc: fix gcc warnings Darrick J. Wong
2014-08-24 16:24   ` Theodore Ts'o
2014-08-09  4:26 ` [PATCH 3/6] mke2fs: set block_validity as a default mount option Darrick J. Wong
2014-08-24 22:47   ` Theodore Ts'o
2014-08-25 15:52     ` Darrick J. Wong
2014-08-25 16:36       ` [PATCH] ext4: enable block_validity by default Darrick J. Wong
2014-09-02  2:02         ` Theodore Ts'o
2014-08-09  4:26 ` [PATCH 4/6] ext2fs: add readahead method to improve scanning Darrick J. Wong
2014-08-09  4:26 ` [PATCH 5/6] libext2fs/e2fsck: provide routines to read-ahead metadata Darrick J. Wong
2014-08-11  5:21   ` Darrick J. Wong
2014-08-11  6:24     ` Theodore Ts'o
2014-08-11  6:31       ` Darrick J. Wong
2014-08-11 14:34         ` Theodore Ts'o
2014-08-11 18:05           ` Darrick J. Wong [this message]
2014-08-11 18:32             ` Theodore Ts'o
2014-08-11 18:55               ` Darrick J. Wong
2014-08-11 20:10                 ` Theodore Ts'o
2014-08-11 20:50                   ` Darrick J. Wong
2014-08-09  4:26 ` [PATCH 6/6] e2fsck: read-ahead metadata during passes 1, 2, and 4 Darrick J. Wong
2014-08-09  5:53 ` [PATCH 0/6] e2fsprogs Summer 2014 patchbomb, part 5 Theodore Ts'o
2014-08-09  5:59   ` Darrick J. Wong

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=20140811180509.GE2808@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).