]> git.karo-electronics.de Git - mv-sheeva.git/commit
xfs: push stale, pinned buffers on trylock failures
authorDave Chinner <dchinner@redhat.com>
Tue, 30 Nov 2010 04:16:16 +0000 (15:16 +1100)
committerAlex Elder <aelder@sgi.com>
Wed, 1 Dec 2010 13:40:20 +0000 (07:40 -0600)
commit90810b9e82a36c3c57c1aeb8b2918b242a130b26
tree2fdb8bd75866fc3d61cb7fe2f2cc26f0e6895641
parentc726de4409a8d3a03877b1ef4342bfe8a15f5e5e
xfs: push stale, pinned buffers on trylock failures

As reported by Nick Piggin, XFS is suffering from long pauses under
highly concurrent workloads when hosted on ramdisks. The problem is
that an inode buffer is stuck in the pinned state in memory and as a
result either the inode buffer or one of the inodes within the
buffer is stopping the tail of the log from being moved forward.

The system remains in this state until a periodic log force issued
by xfssyncd causes the buffer to be unpinned. The main problem is
that these are stale buffers, and are hence held locked until the
transaction/checkpoint that marked them state has been committed to
disk. When the filesystem gets into this state, only the xfssyncd
can cause the async transactions to be committed to disk and hence
unpin the inode buffer.

This problem was encountered when scaling the busy extent list, but
only the blocking lock interface was fixed to solve the problem.
Extend the same fix to the buffer trylock operations - if we fail to
lock a pinned, stale buffer, then force the log immediately so that
when the next attempt to lock it comes around, it will have been
unpinned.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/linux-2.6/xfs_buf.c