HomeFreeBSD

Clear PG_writeback after zil_commit() for sync I/O

Description

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

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Aug 29 2012, 6:52 PM
Parents
rGe6f290535c2f: Fix mount_zfs dependency on libzpool.
Branches
Unknown
Tags
Unknown