openzfs icon indicating copy to clipboard operation
openzfs copied to clipboard

WIP : Do more syncing when kstat.zfs.darwin.tunable.use_system_sync != 0

Open rottegift opened this issue 3 years ago • 0 comments

  1. Optionally set B_FUA on ZIO_PRIORITY_SYNC_WRITEs, which is uses for label and zil writes
  2. Optionally issue a full sync rather than a barrier sync
  3. Avoid a panic if a device goes offline during a full sync or barrier sync; higher layers in o3x will fault the affected device
  4. Tidy taskq_empty_ent, eliminating a source of DEBUG logspam

Open questions:

  1. Default to "paranoia"? With reasonably current Macs, performance hit may be worth the safety.
  2. Tidy naming of the tunable, maybe split tunable into 3 parts (barrier vs full; FUA vs no FUA; and bail out early from zfs_vfs_sync() or not).
  3. A fourth option: do zfs_vfs_sync() except for spa_sync_allpools()

On a busy multipool system with a mix of spinnydisks-alone, spinnydisks+SSD-slogs, and SSDs-alone, doing all the sync (except not-yet-tested B_FUA) does not hurt performance in practice.

Maybe-todo, maybe kick to future: look into zvols in the sync=standard case.

rottegift avatar Aug 17 '22 17:08 rottegift