diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-09-27 22:27:25 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-10-18 16:07:45 -0400 |
commit | dcd79a1423f64ee0184629874805c3ac40f3a2c5 (patch) | |
tree | 7015d6b6537d4fe3f5371a843a0a9cd45204fb47 /fs/xfs/xfs_inode_item.c | |
parent | e176579e70118ed7cfdb60f963628fe0ca771f3d (diff) |
xfs: don't use vfs writeback for pure metadata modifications
Under heavy multi-way parallel create workloads, the VFS struggles
to write back all the inodes that have been changed in age order.
The bdi flusher thread becomes CPU bound, spending 85% of it's time
in the VFS code, mostly traversing the superblock dirty inode list
to separate dirty inodes old enough to flush.
We already keep an index of all metadata changes in age order - in
the AIL - and continued log pressure will do age ordered writeback
without any extra overhead at all. If there is no pressure on the
log, the xfssyncd will periodically write back metadata in ascending
disk address offset order so will be very efficient.
Hence we can stop marking VFS inodes dirty during transaction commit
or when changing timestamps during transactions. This will keep the
inodes in the superblock dirty list to those containing data or
unlogged metadata changes.
However, the timstamp changes are slightly more complex than this -
there are a couple of places that do unlogged updates of the
timestamps, and the VFS need to be informed of these. Hence add a
new function xfs_trans_ichgtime() for transactional changes,
and leave xfs_ichgtime() for the non-transactional changes.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_inode_item.c')
-rw-r--r-- | fs/xfs/xfs_inode_item.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index fe00777e2796..c7ac020705df 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
@@ -223,15 +223,6 @@ xfs_inode_item_format( | |||
223 | nvecs = 1; | 223 | nvecs = 1; |
224 | 224 | ||
225 | /* | 225 | /* |
226 | * Make sure the linux inode is dirty. We do this before | ||
227 | * clearing i_update_core as the VFS will call back into | ||
228 | * XFS here and set i_update_core, so we need to dirty the | ||
229 | * inode first so that the ordering of i_update_core and | ||
230 | * unlogged modifications still works as described below. | ||
231 | */ | ||
232 | xfs_mark_inode_dirty_sync(ip); | ||
233 | |||
234 | /* | ||
235 | * Clear i_update_core if the timestamps (or any other | 226 | * Clear i_update_core if the timestamps (or any other |
236 | * non-transactional modification) need flushing/logging | 227 | * non-transactional modification) need flushing/logging |
237 | * and we're about to log them with the rest of the core. | 228 | * and we're about to log them with the rest of the core. |