From: Matthew Wilcox <willy@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
Joanne Koong <joannelkoong@gmail.com>,
brauner@kernel.org, miklos@szeredi.hu,
hsiangkao@linux.alibaba.com, linux-block@vger.kernel.org,
gfs2@lists.linux.dev, linux-fsdevel@vger.kernel.org,
kernel-team@meta.com, linux-xfs@vger.kernel.org,
linux-doc@vger.kernel.org, Ritesh Harjani <ritesh.list@gmail.com>
Subject: Re: [PATCH v3 10/15] iomap: add bias for async read requests
Date: Mon, 22 Sep 2025 21:54:22 +0100 [thread overview]
Message-ID: <aNG3fnlbJhv1cenS@casper.infradead.org> (raw)
In-Reply-To: <aNGWkujhJ7I4SJoT@infradead.org>
On Mon, Sep 22, 2025 at 11:33:54AM -0700, Christoph Hellwig wrote:
> On Thu, Sep 18, 2025 at 03:30:18PM -0700, Darrick J. Wong wrote:
> > > + iomap_start_folio_read(folio, 1);
> >
> > I wonder, could you achieve the same effect by elevating
> > read_bytes_pending by the number of bytes that we think we have to read,
> > and subtracting from it as the completions come in or we decide that no
> > read is necessary?
>
> Weren't we going to look into something like that anyway to stop
> the read code from building bios larger than the map to support the
> extN boundary conditions? I'm trying to find the details of that,
> IIRC willy suggested it. Because once we touch this area for
> non-trivial changes it might be a good idea to get that done, or at
> least do the prep work.
Yes, I did suggest it. Basically, we would initialise read_bytes_pending
to folio_size(), then subtract from it either when a request comes in
or we decide to memset a hole. When it reaches zero, we have decided
on the fate of every byte in the folio.
It's fewer atomics for folios which contain no holes, which is the case
we should be optimising for anyway.
next prev parent reply other threads:[~2025-09-22 20:54 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 23:44 [PATCH v3 00/15] fuse: use iomap for buffered reads + readahead Joanne Koong
2025-09-16 23:44 ` [PATCH v3 01/15] iomap: move bio read logic into helper function Joanne Koong
2025-09-18 21:27 ` Darrick J. Wong
2025-09-16 23:44 ` [PATCH v3 02/15] iomap: move read/readahead bio submission " Joanne Koong
2025-09-18 21:27 ` Darrick J. Wong
2025-09-16 23:44 ` [PATCH v3 03/15] iomap: store read/readahead bio generically Joanne Koong
2025-09-18 21:29 ` Darrick J. Wong
2025-09-16 23:44 ` [PATCH v3 04/15] iomap: iterate over entire folio in iomap_readpage_iter() Joanne Koong
2025-09-18 21:37 ` Darrick J. Wong
2025-09-22 22:33 ` Joanne Koong
2025-09-16 23:44 ` [PATCH v3 05/15] iomap: rename iomap_readpage_iter() to iomap_read_folio_iter() Joanne Koong
2025-09-16 23:44 ` [PATCH v3 06/15] iomap: rename iomap_readpage_ctx struct to iomap_read_folio_ctx Joanne Koong
2025-09-16 23:44 ` [PATCH v3 07/15] iomap: track read/readahead folio ownership internally Joanne Koong
2025-09-18 21:49 ` Darrick J. Wong
2025-09-19 18:14 ` Joanne Koong
2025-09-16 23:44 ` [PATCH v3 08/15] iomap: add public start/finish folio read helpers Joanne Koong
2025-09-16 23:44 ` [PATCH v3 09/15] iomap: add caller-provided callbacks for read and readahead Joanne Koong
2025-09-16 23:44 ` [PATCH v3 10/15] iomap: add bias for async read requests Joanne Koong
2025-09-18 22:30 ` Darrick J. Wong
2025-09-19 18:34 ` Joanne Koong
2025-09-22 18:33 ` Christoph Hellwig
2025-09-22 20:54 ` Matthew Wilcox [this message]
2025-09-24 22:56 ` Joanne Koong
2025-09-22 23:19 ` Joanne Koong
2025-09-16 23:44 ` [PATCH v3 11/15] iomap: move buffered io bio logic into new file Joanne Koong
2025-09-17 21:40 ` kernel test robot
2025-09-18 22:31 ` Darrick J. Wong
2025-09-19 15:33 ` Christoph Hellwig
2025-09-19 15:32 ` Christoph Hellwig
2025-09-16 23:44 ` [PATCH v3 12/15] iomap: make iomap_read_folio() a void return Joanne Koong
2025-09-18 21:55 ` Darrick J. Wong
2025-09-16 23:44 ` [PATCH v3 13/15] fuse: use iomap for read_folio Joanne Koong
2025-09-16 23:44 ` [PATCH v3 14/15] fuse: use iomap for readahead Joanne Koong
2025-09-18 22:35 ` Darrick J. Wong
2025-09-16 23:44 ` [PATCH v3 15/15] fuse: remove fc->blkbits workaround for partial writes Joanne Koong
2025-09-18 22:35 ` Darrick J. Wong
2025-09-17 8:30 ` [syzbot ci] Re: fuse: use iomap for buffered reads + readahead syzbot ci
2025-09-17 19:59 ` Joanne Koong
2025-09-18 15:48 ` Aleksandr Nogikh
2025-09-18 21:15 ` Joanne Koong
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=aNG3fnlbJhv1cenS@casper.infradead.org \
--to=willy@infradead.org \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=gfs2@lists.linux.dev \
--cc=hch@infradead.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=joannelkoong@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=ritesh.list@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox