From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 03/15] xfs: plug directory buffer readahead
Date: Thu, 27 Jun 2013 16:04:47 +1000 [thread overview]
Message-ID: <1372313099-8121-4-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1372313099-8121-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
Similar to bulkstat inode chunk readahead, we need to plug directory
data buffer readahead during getdents to ensure that we can merge
adjacent readahead requests and sort out of order requests optimally
before they are dispatched. This improves the readahead efficiency
and reduces the IO load it generates as the IO patterns are
significantly better for both contiguous and fragmented directories.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
---
fs/xfs/xfs_dir2_leaf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c
index da71a18..bb22aac 100644
--- a/fs/xfs/xfs_dir2_leaf.c
+++ b/fs/xfs/xfs_dir2_leaf.c
@@ -1108,6 +1108,7 @@ xfs_dir2_leaf_readbuf(
struct xfs_mount *mp = dp->i_mount;
struct xfs_buf *bp = *bpp;
struct xfs_bmbt_irec *map = mip->map;
+ struct blk_plug plug;
int error = 0;
int length;
int i;
@@ -1236,6 +1237,7 @@ xfs_dir2_leaf_readbuf(
/*
* Do we need more readahead?
*/
+ blk_start_plug(&plug);
for (mip->ra_index = mip->ra_offset = i = 0;
mip->ra_want > mip->ra_current && i < mip->map_blocks;
i += mp->m_dirblkfsbs) {
@@ -1287,6 +1289,7 @@ xfs_dir2_leaf_readbuf(
}
}
}
+ blk_finish_plug(&plug);
out:
*bpp = bp;
--
1.7.10.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-06-27 6:05 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 6:04 [PATCH 00/15] xfs: patchset for 3.11 Dave Chinner
2013-06-27 6:04 ` [PATCH 01/15] xfs: update mount options documentation Dave Chinner
2013-06-27 14:48 ` Ben Myers
2013-06-27 19:08 ` Ben Myers
2013-06-28 2:09 ` Dave Chinner
2013-06-28 2:32 ` Dave Chinner
2013-06-28 15:39 ` Geoffrey Wehrman
2013-06-28 16:49 ` Eric Sandeen
2013-06-28 19:58 ` Geoffrey Wehrman
2013-06-28 17:27 ` Ric Wheeler
2013-06-28 19:39 ` Ben Myers
2013-06-29 2:38 ` Dave Chinner
2013-06-28 2:18 ` Eric Sandeen
2013-06-28 20:46 ` Ben Myers
2013-06-27 6:04 ` [PATCH 02/15] xfs: add pluging for bulkstat readahead Dave Chinner
2013-06-27 6:04 ` Dave Chinner [this message]
2013-06-27 6:04 ` [PATCH 04/15] xfs: don't use speculative prealloc for small files Dave Chinner
2013-06-27 6:04 ` [PATCH 05/15] xfs: don't do IO when creating an new inode Dave Chinner
2013-06-27 6:04 ` [PATCH 06/15] xfs: xfs_ifree doesn't need to modify the inode buffer Dave Chinner
2013-06-27 6:04 ` [PATCH 07/15] xfs: Introduce ordered log vector support Dave Chinner
2013-06-27 6:04 ` [PATCH 08/15] xfs: Introduce an ordered buffer item Dave Chinner
2013-06-27 6:04 ` [PATCH 09/15] xfs: Inode create log items Dave Chinner
2013-06-27 6:04 ` [PATCH 10/15] xfs: Inode create transaction reservations Dave Chinner
2013-06-27 6:04 ` [PATCH 11/15] xfs: Inode create item recovery Dave Chinner
2013-06-27 6:04 ` [PATCH 12/15] xfs: Use inode create transaction Dave Chinner
2013-06-27 6:04 ` [PATCH 13/15] xfs: remove local fork format handling from xfs_bmapi_write() Dave Chinner
2013-06-27 6:04 ` [PATCH 14/15] xfs: dquot log reservations are too small Dave Chinner
2013-06-27 14:38 ` Mark Tinguely
2013-06-28 17:18 ` Chandra Seetharaman
2013-06-29 2:42 ` Dave Chinner
2013-07-09 19:31 ` Ben Myers
2013-07-09 20:39 ` Dave Chinner
2013-07-09 20:42 ` Ben Myers
2013-06-27 6:04 ` [PATCH 15/15] xfs: implement inode change count Dave Chinner
2013-06-27 15:06 ` Mark Tinguely
2013-06-28 16:07 ` Chandra Seetharaman
2013-06-28 18:00 ` Ben Myers
2013-06-27 19:48 ` [PATCH 00/15] xfs: patchset for 3.11 Ben Myers
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=1372313099-8121-4-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/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