]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxfs/rdwr.c
libxfs: contiguous buffers are not discontigous
authorDave Chinner <dchinner@redhat.com>
Sun, 23 Feb 2014 21:12:41 +0000 (08:12 +1100)
committerDave Chinner <david@fromorbit.com>
Sun, 23 Feb 2014 21:12:41 +0000 (08:12 +1100)
commitf388124dacc710a414196ef0e42284a438cfc868
treeecb0bab8d6a4f06d95347371d03b4b34b43f2c58
parentd58685851222c12bc3c089f40c159268f26705c4
libxfs: contiguous buffers are not discontigous

When discontiguous directory buffer support was fixed in xfs_repair,
(dd9093d xfs_repair: fix discontiguous directory block support)
it changed to using libxfs_getbuf_map() to support mapping
discontiguous blocks, and the prefetch code special cased such
discontiguous buffers.

The issue is that libxfs_getbuf_map() marks all buffers, even
contiguous ones - as LIBXFS_B_DISCONTIG, and so the prefetch code
was treating every buffer as discontiguous. This causes the prefetch
code to completely bypass the large IO optimisations for dense areas
of metadata. Because there was no obvious change in performance or
IO patterns, this wasn't noticed during performance testing.

However, this change mysteriously fixed a regression in xfs/033 in
the v3.2.0-alpha release, and this change in behaviour was
discovered as part of triaging why it "fixed" the regression.
Anyway, restoring the large IO prefetch optimisation results
a repair on a 10 million inode filesystem dropping from 197s to 173s,
and the peak IOPS rate in phase 3 dropping from 25,000 to roughly
2,000 by trading off a bandwidth increase of roughly 100% (i.e.
200MB/s to 400MB/s). Phase 4 saw similar changes in IO profile and
speed increases.

This, however, re-introduces the regression in xfs/033, which will
now be fixed in a separate patch.

Reported-by: Eric Sandeen <esandeen@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <esandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/rdwr.c