mbox series

[v2,0/2] iomap: avoid flushes for partial eof zeroing

Message ID 20241031140449.439576-1-bfoster@redhat.com (mailing list archive)
Headers show
Series iomap: avoid flushes for partial eof zeroing | expand

Message

Brian Foster Oct. 31, 2024, 2:04 p.m. UTC
Hi all,

Here's v2 of the performance improvement for zero range. This is the
same general idea as v1, but a rework to lift the special handling of
zeroed mappings into the caller and open-code the two approaches from
there. The idea is that for partial eof zeroing, we can check whether
the folio for the block is already dirty in pagecache and if so, zero it
directly. Otherwise, fall back into existing behavior for the remainder
of the range.

This brings stress-ng metamix performance back in my local tests and
survives fstests without seeing any regressions.

Thoughts, reviews, flames appreciated.

Brian

v2:
- Added patch 1 to lift zeroed mapping handling code into caller.
- Split unaligned start range handling at the top level.
- Retain existing conditional flush behavior (vs. unconditional flush)
  for the remaining range.
v1: https://lore.kernel.org/linux-fsdevel/20241023143029.11275-1-bfoster@redhat.com/

Brian Foster (2):
  iomap: lift zeroed mapping handling into iomap_zero_range()
  iomap: elide flush from partial eof zero range

 fs/iomap/buffered-io.c | 99 ++++++++++++++++++++++++------------------
 1 file changed, 56 insertions(+), 43 deletions(-)