]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
xfs: convert ENOSPC inode flushing to use new syncd workqueue
authorDave Chinner <dchinner@redhat.com>
Fri, 8 Apr 2011 02:45:07 +0000 (12:45 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 8 Apr 2011 02:45:07 +0000 (12:45 +1000)
commit89e4cb550a492cfca038a555fcc1bdac58822ec3
treeab688a1849d6361c92b9f60ae0586045908010da
parentc6d09b666de11eb272326a6eb6cd3246da571014
xfs: convert ENOSPC inode flushing to use new syncd workqueue

On of the problems with the current inode flush at ENOSPC is that we
queue a flush per ENOSPC event, regardless of how many are already
queued. Thi can result in    hundreds of queued flushes, most of
which simply burn CPU scanned and do no real work. This simply slows
down allocation at ENOSPC.

We really only need one active flush at a time, and we can easily
implement that via the new xfs_syncd_wq. All we need to do is queue
a flush if one is not already active, then block waiting for the
currently active flush to complete. The result is that we only ever
have a single ENOSPC inode flush active at a time and this greatly
reduces the overhead of ENOSPC processing.

On my 2p test machine, this results in tests exercising ENOSPC
conditions running significantly faster - 042 halves execution time,
083 drops from 60s to 5s, etc - while not introducing test
regressions.

This allows us to remove the old xfssyncd threads and infrastructure
as they are no longer used.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/xfs_mount.h