From: Daejun Park via B4 Relay <devnull+daejun7.park.samsung.com@kernel.org>
To: Carlos Maiolino <cem@kernel.org>, linux-xfs@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>,
Dave Chinner <david@fromorbit.com>,
"Darrick J. Wong" <djwong@kernel.org>,
Amir Goldstein <amir73il@gmail.com>,
Brian Foster <bfoster@redhat.com>,
linux-kernel@vger.kernel.org,
Daejun Park <daejun7.park@samsung.com>
Subject: [PATCH v2 0/2] xfs: skip redundant fsync cache flushes
Date: Wed, 11 Nov 2026 12:17:10 +0900 [thread overview]
Message-ID: <20261111-xfs-fsync-flush-seq-v2-0-b5c00c25d276@samsung.com> (raw)
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>
next reply other threads:[~2026-11-11 3:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 3:17 Daejun Park via B4 Relay [this message]
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 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 6:47 ` [PATCH v2 0/2] xfs: skip redundant fsync cache flushes Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261111-xfs-fsync-flush-seq-v2-0-b5c00c25d276@samsung.com \
--to=devnull+daejun7.park.samsung.com@kernel.org \
--cc=amir73il@gmail.com \
--cc=bfoster@redhat.com \
--cc=cem@kernel.org \
--cc=daejun7.park@samsung.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®