]> git.proxmox.com Git - mirror_zfs-debian.git/commit
Clear PG_writeback after zil_commit() for sync I/O
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 29 Aug 2012 18:52:47 +0000 (11:52 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 31 Aug 2012 03:16:28 +0000 (20:16 -0700)
commit2b2861362f7dd09cc3167df8fddb6e2cb475018a
tree4ee7be79e46efaf327c7da417c1ad7e7ad38c331
parente6f290535c2fff8b940c4eacb1c90cbc2cfc7508
Clear PG_writeback after zil_commit() for sync I/O

When writing via ->writepage() the writeback bit was always cleared
as part of the txg commit callback.  However, when the I/O is also
being written synchronsously to the zil we can immediately clear this
bit.  There is no need to wait for the subsequent TXG sync since the
data is already safe on stable storage.

This has been observed to reduce the msync(2) delay from up to 5
seconds down 10s of miliseconds.  One workload which is expected
to benefit from this are the intermittent samba hands described
in issue #700.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #700
Closes #907
module/zfs/zfs_vnops.c