mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] xfs: skip redundant fsync cache flushes
@ 2026-11-11  3:17 Daejun Park via B4 Relay
  2026-11-11  3:17 ` [PATCH v2 1/2] xfs: number the cache flushes submitted to each buftarg Daejun Park via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daejun Park via B4 Relay @ 2026-11-11  3:17 UTC (permalink / raw)
  To: Carlos Maiolino, linux-xfs
  Cc: Christoph Hellwig, Dave Chinner, Darrick J. Wong, Amir Goldstein,
	Brian Foster, linux-kernel, Daejun Park

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: 1111 -> 4498
fsyncs/s. fstests -g quick shows no change, and a dm-log-writes crash
test on an internal log lost no data (patch 2).

---
Changes in v2:
- Zero ic_flush_seq after the bio setup and take the flush number
  where REQ_PREFLUSH is set
- Move the fio result into the commit log of patch 2, measured again
  for both kernels on the new base, and add the single job result
- Rename the argument of xfs_buftarg_flushed_since() and the fsync
  local to submit_seq, and describe the submit and completion ordering
  in the comments
- Keep the fsync comment on why the flush is needed
- In patch 2, shorten the DAX text in the comment and the commit log,
  and drop the commit log sentence on numbering the fsync's own flush
- Say below --- of patch 2 what changes for a failed flush on
  bio-based dm
- Rebase onto the current for-next (v7.4-rc2)

---
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      | 40 ++++++++++++++++++++++++++++++++++++++++
 fs/xfs/xfs_buf.h      | 43 +++++++++++++++++++++++++++++++++++++++++++
 fs/xfs/xfs_file.c     | 18 +++++++++++++++---
 fs/xfs/xfs_log.c      | 28 +++++++++++++++++++++-------
 fs/xfs/xfs_log_priv.h |  1 +
 5 files changed, 120 insertions(+), 10 deletions(-)
---
base-commit: 48326a2382d80715475d10ce98734ac65d2d2150
change-id: 20261105-xfs-fsync-flush-seq-83ae2cff6225

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-11 14:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11  3:17 [PATCH v2 0/2] xfs: skip redundant fsync cache flushes Daejun Park via B4 Relay
2026-11-11  3:17 ` [PATCH v2 1/2] xfs: number the cache flushes submitted to each buftarg Daejun Park via B4 Relay
2026-11-11 14:22   ` Brian Foster
2026-11-11  3:17 ` [PATCH v2 2/2] xfs: skip the fsync flush when a later flush has completed Daejun Park via B4 Relay
2026-11-11 14:22   ` Brian Foster
2026-11-11  6:47 ` [PATCH v2 0/2] xfs: skip redundant fsync cache flushes Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®