Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] xfs: reduce ILOCK contention on O_DSYNC DIO
@ 2025-09-17 22:12 Dave Chinner
  2025-09-17 22:12 ` [PATCH 1/2] xfs: rearrange code in xfs_inode_item_precommit Dave Chinner
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Dave Chinner @ 2025-09-17 22:12 UTC (permalink / raw)
  To: linux-xfs; +Cc: jack, lherbolt

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.


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

end of thread, other threads:[~2025-09-23 13:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17 22:12 [PATCH 0/2] xfs: reduce ILOCK contention on O_DSYNC DIO Dave Chinner
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

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