From: Christoph Hellwig <hch@infradead.org>
To: changfengnan <changfengnan@bytedance.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Fengnan Chang <fengnanchang@gmail.com>,
brauner <brauner@kernel.org>, djwong <djwong@kernel.org>,
linux-xfs <linux-xfs@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-ext4 <linux-ext4@vger.kernel.org>,
lidiangang@bytedance.com
Subject: Re: [RFC PATCH] iomap: add fast read path for small direct I/O
Date: Fri, 17 Apr 2026 00:30:54 -0700 [thread overview]
Message-ID: <aeHhrsGtJRhP521d@infradead.org> (raw)
In-Reply-To: <d9210bcdf73fbe1ac8b6ec132865609a3ed68688.eee197c0.e67e.40c8.bd15.8fab5bbb42db@bytedance.com>
On Thu, Apr 16, 2026 at 11:16:23AM +0800, changfengnan wrote:
> > But it already is a major improvement, and one that would apply outside
> > of narrow special cases. So I'd really like to see that patch.
> You can see this in:
> https://lore.kernel.org/linux-fsdevel/20260416030642.26744-1-changfengnan@bytedance.com/T/#u
Thanks!
> > All direct I/O requires this.
> >
> > > - No bounce buffering, fscrypt, or fsverity involved.
> > > - No custom `iomap_dio_ops` (dops) registered by the filesystem.
> >
> > I'm really curious at what difference this makes. It removes a few
> > branches, but should not have much of an effect while limiting the
> > applicability a lot.
> Yes, the impact shouldn’t be significant.
> Since this is just a RFC version to confirm that I’m on the right path, there
> are many aspects that haven’t been fully thought through yet. I haven’t
> tested these scenarios yet, but I’ll add support for them later to
> check exactly what the impact is.
Sure. It might also make sense to skip some of this if it brings a big
enough benefit.
> > > +struct iomap_dio_fast_read {
> > > + struct kiocb *iocb;
> > > + size_t size;
> > > + bool should_dirty;
> > > + struct work_struct work;
> > > + struct bio bio ____cacheline_aligned_in_smp;
> >
> > Does the cache line alignment matter here? If yes, can you explain why
> > in a comment?
>
> I copy this from struct blkdev_dio , I'll do some test to verfiy.
Thanks. Btw, another thing that might be worth is to drop the
work_struct and reuse iomap_fail_reads or something similar to it.
This would be a pretty big size reduction. Additionally we should
be able to kill should_dirty and just rely on bio or kiocb flags.
next prev parent reply other threads:[~2026-04-17 7:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 12:26 [RFC PATCH] iomap: add fast read path for small direct I/O Fengnan Chang
2026-04-15 7:14 ` Christoph Hellwig
2026-04-16 3:16 ` changfengnan
2026-04-17 7:30 ` Christoph Hellwig [this message]
2026-04-15 19:06 ` Ojaswin Mujoo
2026-04-16 3:22 ` changfengnan
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=aeHhrsGtJRhP521d@infradead.org \
--to=hch@infradead.org \
--cc=brauner@kernel.org \
--cc=changfengnan@bytedance.com \
--cc=djwong@kernel.org \
--cc=fengnanchang@gmail.com \
--cc=lidiangang@bytedance.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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