From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Cc: jack@suse.cz, lherbolt@redhat.com
Subject: [PATCH 0/2] xfs: reduce ILOCK contention on O_DSYNC DIO
Date: Thu, 18 Sep 2025 08:12:52 +1000 [thread overview]
Message-ID: <20250917222446.1329304-1-david@fromorbit.com> (raw)
Hi folks,
This is the changes I came up with in the course of the discussion
with Jan about the fallocate+DIO+O_DSYNC performance improvement
thread here:
https://lore.kernel.org/linux-xfs/CAM4Jq_71gxMcnOdgqWhKEa53sr9r57Qpi0hc5bs3NgtnNOGwtg@mail.gmail.com/T/#
The first patch is moves a little bit of code around to ensure
that xfs_inode_item_precommit() always calculates all the changes
before it starts manipulating the dirty and fsync flags on the inode
log item. Whilst technically it could be considered a bug fix, the
bug it fixes requires an inconsistency in the on disk format to
exist first, so it likely won't ever be an issue in normal
production systems. It also requires an application to run a
fdatasync and then have a system crash just after the
inconsistency is addressed to expose it. So the likelihood of it
ever being triggered as a data integrity issue is -extremely- tiny.
The second patch is the one that addresses the performance issue. It
removes the ILOCK from the sync/datasync path completely, and
instead relies on a new datasync commit sequence number being stored
in the inode log item to elide datasync journal flushes when they
are unnecessary. The mechanism is explained at length in the patch
description.
The changes have been perf tested by both Jan and Lukas, and it has
passed multiple fstests runs on a dozen different configs without
regressions here.
-Dave.
next reply other threads:[~2025-09-17 22:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 22:12 Dave Chinner [this message]
2025-09-17 22:12 ` [PATCH 1/2] xfs: rearrange code in xfs_inode_item_precommit Dave Chinner
2025-09-18 22:49 ` Darrick J. Wong
2025-09-19 15:19 ` Christoph Hellwig
2025-09-19 16:08 ` Darrick J. Wong
2025-09-22 18:12 ` Christoph Hellwig
2025-09-17 22:12 ` [PATCH 2/2] xfs: rework datasync tracking and execution Dave Chinner
2025-09-19 15:30 ` Christoph Hellwig
2025-09-23 12:12 ` Carlos Maiolino
2025-09-23 13:51 ` [PATCH 0/2] xfs: reduce ILOCK contention on O_DSYNC DIO Carlos Maiolino
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=20250917222446.1329304-1-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=jack@suse.cz \
--cc=lherbolt@redhat.com \
--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