Linux 6.14 Adding "STATX_DIO_READ_ALIGN" To Address A Performance Pitfall

Written by Michael Larabel in Linux Storage on 20 January 2025 at 06:19 AM EST. 2 Comments
LINUX STORAGE
Among the VFS pull requests sent out this weekend in advance of the Linux 6.14 merge window formally opening were the VFS direct I/O (DIO) updates that introduce a new STATX_DIO_READ_ALIGN field for addressing a possible performance pitfall.

The patch series by longtime Linux developer Christoph Hellwig for introducing STATX_DIO_READ_ALIGN is explained as:
"File systems that write out of place usually require different alignment for direct I/O writes than what they can do for reads.

Add a separate dio read align field to statx, as many out of place write file systems can easily do reads aligned to the device sector size, but require bigger alignment for writes.

This is usually papered over by falling back to buffered I/O for smaller writes and doing read-modify-write cycles, but performance for this sucks, so applications benefit from knowing the actual write alignment."

And thus this pull request introduces the 100 some lines of new code for STATX_DIO_READ_ALIGN plus a few changes to the XFS file-system handling.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week