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

From: changfengnan

Date: Fri Jul 03 2026 - 05:26:51 EST



> From: "Joanne Koong"<joannelkoong@xxxxxxxxx>
> Date:  Fri, Jul 3, 2026, 11:06
> Subject:  Re: [PATCH v6 3/3] iomap: add simple dio path for small direct I/O
> To: "Christoph Hellwig"<hch@xxxxxxxxxxxxx>
> Cc: "Fengnan Chang"<changfengnan@xxxxxxxxxxxxx>, <brauner@xxxxxxxxxx>, <djwong@xxxxxxxxxx>, <ojaswin@xxxxxxxxxxxxx>, <dgc@xxxxxxxxxx>, <linux-xfs@xxxxxxxxxxxxxxx>, <linux-fsdevel@xxxxxxxxxxxxxxx>, <linux-ext4@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <lidiangang@xxxxxxxxxxxxx>, <pankaj.raghav@xxxxxxxxx>, "Brian Foster"<bfoster@xxxxxxxxxx>
> On Thu, Jul 2, 2026 at 7:35 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> >
> > 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.
> 
> Ah I see now, the whole point of Fengnan's series is to k eep the
> logic minimal...
> 
> Fengnan, I think you had mentioned earlier [1] that enabling
> iomap_next brought the simple-read gain down from 10% to 7%? Thanks
> for running those numbers. Would you be able to share the changes you
> made to iomap_dio_rw to support iomap_next for those benchmarks you
> ran?

Hi Joanne:
My previous change was to pass `xfs_read_iomap_begin` and
`ext4_iomap_begin` from ext4/xfs directly to `iomap_dio_simple`, since
`iomap_begin` was still present in `struct iomap_ops` at the time.
You can ignore my previous patch; let’s continue the analysis based on
your patch now.

> 
> Thanks,
> Joanne
> 
> [1] https://lore.kernel.org/linux-fsdevel/e85e73bd-5fbe-4d11-89ba-7b42c237dd34@xxxxxxxxxxxxx/
>