[PATCH] xfs: preallocation transactions do not need to be synchronous
Christoph Hellwig
hch at infradead.org
Thu Mar 10 01:36:34 CST 2011
On Thu, Mar 10, 2011 at 10:37:32AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> Preallocation and hole punch transactions are currently synchronous
> and this is causing performance problems in some cases. The
> transactions don't need to be synchronous as we don't need to
> guarantee the preallocation is persistent on disk until a
> fdatasync, fsync, sync operation occurs. If the file is opened
> O_SYNC or O_DATASYNC, only then should the transaction be issued
> synchronously.
I had the same patch in my queue, but it turns out even that isn't
enough for good performance when used fallocate in the fast path (e.g.
recent Samba). I'll send a more comprehensive optimization that
includes this soon.
I also refactored the whole area to make the various flags more
sensible.
More information about the xfs
mailing list