From: Christoph Hellwig <hch@infradead.org>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Yifan Zhao <zhaoyifan28@huawei.com>,
linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org,
yekelu1@huawei.com, jingrui@huawei.com, zhukeqian1@huawei.com,
Ritesh Harjani <ritesh.list@gmail.com>,
"Darrick J. Wong" <djwong@kernel.org>,
linux-xfs@vger.kernel.org, Joanne Koong <joannelkoong@gmail.com>
Subject: Re: don't merge bios over iomap boundaries, was: Re: [PATCH] erofs: prevent buffered read bio merges across device chunks
Date: Fri, 12 Jun 2026 01:01:52 -0700 [thread overview]
Message-ID: <aiu88BAe1EqxpeOB@infradead.org> (raw)
In-Reply-To: <04d8ea84-1955-4f1e-b5f2-f142fa1971ba@linux.alibaba.com>
On Fri, Jun 12, 2026 at 03:19:30PM +0800, Gao Xiang wrote:
>
>
> On 2026/6/12 15:10, Christoph Hellwig wrote:
> > On Fri, Jun 12, 2026 at 02:54:47PM +0800, Gao Xiang wrote:
> > > hmm, currently erofs could return block-sized iomap (if the chunk
> > > size is 4k) even it can be merged with the following chunks.
> > >
> > > Previously it was fairly good since consecutive chunks will be
> > > added to the current bio if possible, but after this patch,
> > > there will be a lot of 4k bios.
> > >
> > > But if iomap goes into this way, I could make iomap_begin maps
> > > more chunks in one shot, but that needs more changes in erofs,
> > > it's fine anyway.
> > >
> > > ... I was thinking the following diff (space-damaged):
> >
> > That should work too for your case. But we definitively have various
> > cases where merging over iomaps is a bad idea. You'll also end up with
> > other efficiency gains by merging consecutive entries, especially for
> > direct I/O and when using large folios.
>
> Yes, optimizing erofs chunk mapping would be more
> efficient, will work out one soon, but Yifan can test
> your patch in parallel.
>
> Also, if "iomap: submit read bio after each extent" is
> applied, I guess some merging condition in
> iomap_bio_read_folio_range() can be removed since they
> won't be reached in any case. (deadcode)
I guess we can't hit the sector check anymore indeed, assuming
we never get non-contiguos readeahead requests, which I think is
true.
prev parent reply other threads:[~2026-06-12 8:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 3:32 [PATCH] erofs: prevent buffered read bio merges across device chunks Yifan Zhao
2026-06-12 3:42 ` Gao Xiang
2026-06-12 6:25 ` don't merge bios over iomap boundaries, was: " Christoph Hellwig
2026-06-12 6:54 ` Gao Xiang
2026-06-12 7:10 ` Christoph Hellwig
2026-06-12 7:19 ` Gao Xiang
2026-06-12 7:35 ` Gao Xiang
2026-06-12 8:04 ` Christoph Hellwig
2026-06-12 8:01 ` 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=aiu88BAe1EqxpeOB@infradead.org \
--to=hch@infradead.org \
--cc=djwong@kernel.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=jingrui@huawei.com \
--cc=joannelkoong@gmail.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ritesh.list@gmail.com \
--cc=yekelu1@huawei.com \
--cc=zhaoyifan28@huawei.com \
--cc=zhukeqian1@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.