xfs: reduce ILOCK contention on O_DSYNC DIO
Status from this message: Applied to for-next, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | xfs: rearrange code in xfs_inode_item_precommitfs/ | +29 | 4 replies | |
| 2/2 | xfs: rework datasync tracking and executionfs/ fs/ fs/ +2 more | +128 | 2 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Jan Kara | Darrick J. Wong | Christoph Hellwig |
|---|---|---|---|
| 1/2 | R-b | R-b | |
| 2/2 | T-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/2] xfs: reduce ILOCK contention on O_DSYNC DIO
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:
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.