From: Christoph Hellwig <hch@lst.de>
To: Carlos Maiolino <cem@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
brauner@kernel.org, tytso@mit.edu, changfengnan@bytedance.com,
linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] iomap: don't use iomap_iter for simple dio reads
Date: Fri, 4 Dec 2026 10:04:34 +0100 [thread overview]
Message-ID: <20261204090434.GA20218@lst.de> (raw)
In-Reply-To: <axFEOmV9r27thlZ3@cronus.toxiclabs.cc>
On Thu, Dec 03, 2026 at 11:28:10AM +0100, Carlos Maiolino wrote:
> On Thu, Dec 03, 2026 at 09:36:40AM +0100, Christoph Hellwig wrote:
> > Simple dio reads do not use the iter model, instead they only support
> > a one-time mapping. Removing the relatively larger iomap_iter and
>
> Remove?
Yeah. I've reworded the commit log a bit more as well.
> > provide separate callbacks that directly do the read-only mapping.
>
> > The downside of this is a bit of code duplication for the file system
> > callbacks, although even that has the small upside of only inlining
> > the smaller special-purpose version compared to the generic one.
>
> If the concern is code duplication here, perhaps the duplicated
> verifications could be factored out into something like:
>
> static inline <fs>_iomap_checks() {...}
>
> Wouldn't that still keep the special-purpose version inlined?
>
> Not that I really care about it or that it's something for this patch,
> just a future cleanup.
I'm just enumerating the downsides. The different side of the same coin
is that this now has optimized to the bones callbacks for the simple read
case.
> > diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
> > index 0d6ce1a30b2c..6fa1ca9c30b7 100644
> > --- a/fs/iomap/direct-io.c
> > +++ b/fs/iomap/direct-io.c
> > @@ -980,30 +980,32 @@ static void iomap_dio_simple_end_io(struct bio *bio)
>
> This hunk fails to apply to me because...
>
>
> ... Somehow seems the
>
> if (unlikely(!iomi->inode->i_sb->s_dio_done_wq &&
> ...
> }
>
> is missing here but I'm not sure why. I tried to search in vfs
The patch requires
iomap: don't call sb_init_dio_done_wq from the simple dio read path
and I didn't think of that, sorry. I'll resend a series with both
of them.
prev parent reply other threads:[~2026-12-04 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 8:36 [PATCH] iomap: don't use iomap_iter for simple dio reads Christoph Hellwig
2026-12-03 10:28 ` Carlos Maiolino
2026-12-04 9:04 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204090434.GA20218@lst.de \
--to=hch@lst.de \
--cc=brauner@kernel.org \
--cc=cem@kernel.org \
--cc=changfengnan@bytedance.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox