Re: [PATCH v6 3/3] iomap: add simple dio path for small direct I/O

From: Christoph Hellwig

Date: Thu Jul 02 2026 - 10:35:38 EST


On Wed, Jul 01, 2026 at 12:35:24PM -0700, Joanne Koong wrote:
> I think it ends up being pretty simple to get it integrated since
> ->iomap_next already contains the logic to only begin the mapping at
> the start and only finish the mapping when the iter has been fully
> consumed, eg

I wonder if this adds overhead that the simple path removed.

As a first step we could look into inlining iomap_iter_advance as it
is pretty trivial, and iomap_iter once the legacy path is gone.

If it still shows overhead for that (I think we'll want Fengnan in the
loop to benchmark that), we could look into a 'need end' flag in the
iter and allow to skip the call to iomap_iter_advance and iomap_iter
if it set. Although I'd be happier if we could avoid that..

Talking about iomap_next - I also wonder iwe should move everything
that isn't the call to ->iter_next into iomap_process, which would
remove any calling overhead for ->iter_next itself.