zfs/tests/runfiles
Shaan Nobee 9e5a297de6 Speed up WB_SYNC_NONE when a WB_SYNC_ALL occurs simultaneously
Page writebacks with WB_SYNC_NONE can take several seconds to complete
since they wait for the transaction group to close before being
committed. This is usually not a problem since the caller does not
need to wait. However, if we're simultaneously doing a writeback
with WB_SYNC_ALL (e.g via msync), the latter can block for several
seconds (up to zfs_txg_timeout) due to the active WB_SYNC_NONE
writeback since it needs to wait for the transaction to complete
and the PG_writeback bit to be cleared.

This commit deals with 2 cases:

- No page writeback is active. A WB_SYNC_ALL page writeback starts
  and even completes. But when it's about to check if the PG_writeback
  bit has been cleared, another writeback with WB_SYNC_NONE starts.
  The sync page writeback ends up waiting for the non-sync page
  writeback to complete.

- A page writeback with WB_SYNC_NONE is already active when a
  WB_SYNC_ALL writeback starts. The WB_SYNC_ALL writeback ends up
  waiting for the WB_SYNC_NONE writeback.

The fix works by carefully keeping track of active sync/non-sync
writebacks and committing when beneficial.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Shaan Nobee <sniper111@gmail.com>
Closes #12662
Closes #12790
2023-06-05 10:59:02 -07:00
..
Makefile.am Add sanity.run file 2020-12-03 10:49:39 -08:00
common.run Speed up WB_SYNC_NONE when a WB_SYNC_ALL occurs simultaneously 2023-06-05 10:59:02 -07:00
freebsd.run ZTS: Add tests for DOS mode attributes 2021-03-16 15:00:14 -07:00
linux.run Corrected oversight in ZERO_RANGE behavior 2022-04-21 16:58:07 -07:00
longevity.run OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
perf-regression.run OpenZFS 9184 - Add ZFS performance test for fixed blocksize random read/write IO 2018-07-02 13:46:06 -07:00
sanity.run Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole 2023-05-09 12:57:56 -07:00
sunos.run ZTS: Add a failsafe callback to run after each test 2020-03-10 11:00:56 -07:00