[PATCH 0/2] xfs: skip redundant fsync cache flushes

Daejun Park via B4 Relay posted 2 patches 2 hours ago
fs/xfs/xfs_buf.c      | 39 +++++++++++++++++++++++++++++++++++++++
fs/xfs/xfs_buf.h      | 40 ++++++++++++++++++++++++++++++++++++++++
fs/xfs/xfs_file.c     | 21 +++++++++++++++------
fs/xfs/xfs_log.c      | 25 +++++++++++++++++++------
fs/xfs/xfs_log_priv.h |  1 +
5 files changed, 114 insertions(+), 12 deletions(-)
[PATCH 0/2] xfs: skip redundant fsync cache flushes
Posted by Daejun Park via B4 Relay 2 hours ago
Concurrent fsyncs often wait for an iclog that another task wrote out,
and then send their own cache flush. Patch 1 numbers the cache flushes
on each buftarg. Patch 2 uses the numbers to skip that flush when a
later flush has completed.

16 fio jobs of 4k append + fsync in a QEMU guest: 809 -> 4185
fsyncs/s. fstests -g quick shows no change, and a dm-log-writes crash
test lost no data (patch 2).

---
Daejun Park (2):
      xfs: number the cache flushes submitted to each buftarg
      xfs: skip the fsync flush when a later flush has completed

 fs/xfs/xfs_buf.c      | 39 +++++++++++++++++++++++++++++++++++++++
 fs/xfs/xfs_buf.h      | 40 ++++++++++++++++++++++++++++++++++++++++
 fs/xfs/xfs_file.c     | 21 +++++++++++++++------
 fs/xfs/xfs_log.c      | 25 +++++++++++++++++++------
 fs/xfs/xfs_log_priv.h |  1 +
 5 files changed, 114 insertions(+), 12 deletions(-)
---
base-commit: 1e17fc56469d62d1c1ac45c137a2456d14456f1d
change-id: 20261105-xfs-fsync-flush-seq-83ae2cff6225

Best regards,
-- 
Daejun Park <daejun7.park@samsung.com>