Linux Kernel & OS

Linux 7.4 cuts XFS checksumming overhead with lazy bounce buffers

Key Takeaway

Linux 7.4 replaces unconditional bounce buffering for XFS checksummed reads with a lazy approach that only allocates fallback buffers on actual checksum failures.

Summary

A VFS IOmap change merged for Linux 7.4 eliminates unconditional bounce buffering during checksummed direct reads on XFS. Previously, every such read triggered a bounce buffer allocation to prevent userspace buffer modification from corrupting in-flight data, consuming DRAM bandwidth and CPU cycles for copies rarely needed. The new code writes directly to the user buffer and only retries with a bounce buffer if checksum verification fails. Integrity checking also moves from IOmap into the filesystem layer, giving XFS direct control over error handling.

What changes in the IOmap path

  • Before: XFS unconditionally bounce-buffered every direct read on checksumming devices, using bio_vec allocations that produced smaller, unaligned I/Os (1 MB minus 4K with 4K pages)
  • After: Reads go directly to the user buffer; bounce buffer allocated only on checksum failure
  • Integrity verification moved from generic IOmap code into the filesystem layer so XFS handles errors directly
  • Stable pages requirement still enforced, but without the speculative copy overhead
  • No benchmark numbers were provided in the patch series to quantify the improvement

Why it matters

XFS deployments with data integrity checking enabled—common in enterprise storage and NAS systems—should see reduced memory pressure and CPU usage under read-heavy workloads. The change may also improve I/O alignment for large reads.

Original reference: www.phoronix.com →