public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* enable iomap dio write completions from interrupt context v2
@ 2025-11-13 17:06 Christoph Hellwig
  2025-11-13 17:06 ` [PATCH 1/5] fs, iomap: remove IOCB_DIO_CALLER_COMP Christoph Hellwig
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Christoph Hellwig @ 2025-11-13 17:06 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Alexander Viro, Darrick J. Wong, Jan Kara, Jens Axboe, Avi Kivity,
	Damien Le Moal, Naohiro Aota, Johannes Thumshirn, linux-xfs,
	linux-fsdevel, io-uring

Hi all,

Currently iomap defers all write completions to interrupt context.  This
was based on my assumption that no one cares about the latency of those
to simplify the code vs the old direct-io.c.  It turns out someone cared,
as Avi reported a lot of context switches with ScyllaDB, which at least
in older kernels with workqueue scheduling issues caused really high
tail latencies.

Fortunately allowing the direct completions is pretty easy with all the
other iomap changes we had since.

While doing this I've also found dead code which gets removed (patch 1)
and an incorrect assumption in zonefs that read completions are called
in user context, which it assumes for it's error handling.  Fix this by
always calling error completions from user context (patch 2).

Against the vfs-6.19.iomap branch.

Changes since v1:
 - do away with the iomap_dio_is_overwrite helper to hopefully clean up
   the logic a bit

Diffstat:
 Documentation/filesystems/iomap/operations.rst |    4 
 fs/backing-file.c                              |    6 
 fs/iomap/direct-io.c                           |  184 ++++++++++++-------------
 include/linux/fs.h                             |   43 +----
 io_uring/rw.c                                  |   16 --
 5 files changed, 101 insertions(+), 152 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread
* enable iomap dio write completions from interrupt context
@ 2025-11-12  7:21 Christoph Hellwig
  2025-11-12  7:21 ` [PATCH 3/5] iomap: rework REQ_FUA selection Christoph Hellwig
  0 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2025-11-12  7:21 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Alexander Viro, Darrick J. Wong, Jan Kara, Jens Axboe, Avi Kivity,
	Damien Le Moal, Naohiro Aota, Johannes Thumshirn, linux-xfs,
	linux-fsdevel, io-uring

Hi all,

Currently iomap defers all write completions to interrupt context.  This
was based on my assumption that no one cares about the latency of those
to simplify the code vs the old direct-io.c.  It turns out someone cared,
as Avi reported a lot of context switches with ScyllaDB, which at least
in older kernels with workqueue scheduling issues caused really high
tail latencies.

Fortunately allowing the direct completions is pretty easy with all the
other iomap changes we had since.

While doing this I've also found dead code which gets removed (patch 1)
and an incorrect assumption in zonefs that read completions are called
in user context, which it assumes for it's error handling.  Fix this by
always calling error completions from user context (patch 2).

Against the vfs/vfs-6.19.iomap branch.

Diffstat:
 Documentation/filesystems/iomap/operations.rst |    4 
 fs/backing-file.c                              |    6 -
 fs/iomap/direct-io.c                           |  149 +++++++++++--------------
 include/linux/fs.h                             |   43 +------
 io_uring/rw.c                                  |   16 --
 5 files changed, 81 insertions(+), 137 deletions(-)

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

end of thread, other threads:[~2025-11-24 11:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13 17:06 enable iomap dio write completions from interrupt context v2 Christoph Hellwig
2025-11-13 17:06 ` [PATCH 1/5] fs, iomap: remove IOCB_DIO_CALLER_COMP Christoph Hellwig
2025-11-13 17:09   ` Jens Axboe
2025-11-13 17:06 ` [PATCH 2/5] iomap: always run error completions in user context Christoph Hellwig
2025-11-13 17:06 ` [PATCH 3/5] iomap: rework REQ_FUA selection Christoph Hellwig
2025-11-24 11:05   ` Jan Kara
2025-11-13 17:06 ` [PATCH 4/5] iomap: support write completions from interrupt context Christoph Hellwig
2025-11-24 11:11   ` Jan Kara
2025-11-13 17:06 ` [PATCH 5/5] iomap: invert the polarity of IOMAP_DIO_INLINE_COMP Christoph Hellwig
2025-11-14 11:47 ` enable iomap dio write completions from interrupt context v2 Christian Brauner
  -- strict thread matches above, loose matches on Subject: below --
2025-11-12  7:21 enable iomap dio write completions from interrupt context Christoph Hellwig
2025-11-12  7:21 ` [PATCH 3/5] iomap: rework REQ_FUA selection Christoph Hellwig
2025-11-12 20:07   ` Jan Kara

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