diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-06-27 02:04:46 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-06-27 14:26:23 -0400 |
commit | cbb2864aa48977205c76291ba5a23331393b2578 (patch) | |
tree | 7cf9ee1115ee7032294c3ed5f335abb9f8bc8ff4 | |
parent | 80a4049813a2ae0977d8e5db78e711c7f21c420b (diff) |
xfs: add pluging for bulkstat readahead
I was running some tests on bulkstat on CRC enabled filesystems when
I noticed that all the IO being issued was 8k in size, regardless of
the fact taht we are issuing sequential 8k buffers for inodes
clusters. The IO size should be 16k for 256 byte inodes, and 32k for
512 byte inodes, but this wasn't happening.
blktrace showed that there was an explict plug and unplug happening
around each readahead IO from _xfs_buf_ioapply, and the unplug was
causing the IO to be issued immediately. Hence no opportunity was
being given to the elevator to merge adjacent readahead requests and
dispatch them as a single IO.
Add plugging around the inode chunk readahead dispatch loop in
bulkstat to ensure that we don't unplug the queue between adjacent
inode buffer readahead IOs and so we get fewer, larger IO requests
hitting the storage subsystem for bulkstat.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
-rw-r--r-- | fs/xfs/xfs_itable.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 2ea7d402188d..06d004d85bf4 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c | |||
@@ -383,11 +383,13 @@ xfs_bulkstat( | |||
383 | * Also start read-ahead now for this chunk. | 383 | * Also start read-ahead now for this chunk. |
384 | */ | 384 | */ |
385 | if (r.ir_freecount < XFS_INODES_PER_CHUNK) { | 385 | if (r.ir_freecount < XFS_INODES_PER_CHUNK) { |
386 | struct blk_plug plug; | ||
386 | /* | 387 | /* |
387 | * Loop over all clusters in the next chunk. | 388 | * Loop over all clusters in the next chunk. |
388 | * Do a readahead if there are any allocated | 389 | * Do a readahead if there are any allocated |
389 | * inodes in that cluster. | 390 | * inodes in that cluster. |
390 | */ | 391 | */ |
392 | blk_start_plug(&plug); | ||
391 | agbno = XFS_AGINO_TO_AGBNO(mp, r.ir_startino); | 393 | agbno = XFS_AGINO_TO_AGBNO(mp, r.ir_startino); |
392 | for (chunkidx = 0; | 394 | for (chunkidx = 0; |
393 | chunkidx < XFS_INODES_PER_CHUNK; | 395 | chunkidx < XFS_INODES_PER_CHUNK; |
@@ -399,6 +401,7 @@ xfs_bulkstat( | |||
399 | agbno, nbcluster, | 401 | agbno, nbcluster, |
400 | &xfs_inode_buf_ops); | 402 | &xfs_inode_buf_ops); |
401 | } | 403 | } |
404 | blk_finish_plug(&plug); | ||
402 | irbp->ir_startino = r.ir_startino; | 405 | irbp->ir_startino = r.ir_startino; |
403 | irbp->ir_freecount = r.ir_freecount; | 406 | irbp->ir_freecount = r.ir_freecount; |
404 | irbp->ir_free = r.ir_free; | 407 | irbp->ir_free = r.ir_free; |