diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-12-06 16:21:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-09 08:52:46 -0800 |
commit | edb9a31845c5ba0ff325daa58f17f881d60d1559 (patch) | |
tree | 0ffeb6668a822dd80aa96f2cfeb116bb4fba68e8 /fs/xfs/linux-2.6/xfs_sync.c | |
parent | a980e5dccb3ff8cb8f77ff27264b13837958119d (diff) | |
download | kernel_samsung_aries-edb9a31845c5ba0ff325daa58f17f881d60d1559.zip kernel_samsung_aries-edb9a31845c5ba0ff325daa58f17f881d60d1559.tar.gz kernel_samsung_aries-edb9a31845c5ba0ff325daa58f17f881d60d1559.tar.bz2 |
xfs: force buffer writeback before blocking on the ilock in inode reclaim
commit 4dd2cb4a28b7ab1f37163a4eba280926a13a8749 upstream.
If we are doing synchronous inode reclaim we block the VM from making
progress in memory reclaim. So if we encouter a flush locked inode
promote it in the delwri list and wake up xfsbufd to write it out now.
Without this we can get hangs of up to 30 seconds during workloads hitting
synchronous inode reclaim.
The scheme is copied from what we do for dquot reclaims.
Reported-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: Ben Myers <bpm@sgi.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 8ecad5f..b69688d 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c @@ -772,6 +772,17 @@ restart: if (!xfs_iflock_nowait(ip)) { if (!(sync_mode & SYNC_WAIT)) goto out; + + /* + * If we only have a single dirty inode in a cluster there is + * a fair chance that the AIL push may have pushed it into + * the buffer, but xfsbufd won't touch it until 30 seconds + * from now, and thus we will lock up here. + * + * Promote the inode buffer to the front of the delwri list + * and wake up xfsbufd now. + */ + xfs_promote_inode(ip); xfs_iflock(ip); } |