From: Matthew Wilcox <willy@infradead.org>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: Qu Wenruo <quwenruo.btrfs@gmx.com>,
David Sterba <dsterba@suse.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: Convert add_ra_bio_pages() to use a folio
Date: Thu, 15 Feb 2024 22:04:44 +0000 [thread overview]
Message-ID: <Zc6KfL1r-dxoAyVh@casper.infradead.org> (raw)
In-Reply-To: <cead7376-a45b-41af-8dbd-cbe9dfaee8f3@wdc.com>
On Mon, Jan 29, 2024 at 02:55:23PM +0000, Johannes Thumshirn wrote:
> On 26.01.24 09:53, Matthew Wilcox (Oracle) wrote:
> > Allocate order-0 folios instead of pages. Saves twelve hidden calls
> > to compound_head().
>
> Hey Willy,
>
> Do you have some kind of "Reviewer Documentation" for folio conversion
> patches?
>
> I'd really like to review this one and the others Qu sent out, but I
> fear my knowledge of folios is only scratching the surface.
Sorry for the long delay in response. You deserve a better response
than this, but ... I don't have one. Partly because the things you need
to be concerned about are very different between filesystem patches and
mm patches. In filesystems, it's going to depend on whether the
filesystem intends to support large folios; obviously btrfs does, but
many filesystems (eg adfs, efs, iso9660) will not, because the reward
will not be worth the risk.
Essentially you're asking for me to predict what mistakes other people
are going to make, and that's a tall order. I can barely predict what
mistakes I'm going to make ;-) So we've seen the mistake of shifting
file position by folio_shift(), which is honestly a new one to me.
I've never seen it before. Something that's worth commenting on is
if there are unnecessary conversions from folios back to pages, eg
lock_page(&folio->page) instead of folio_lock(folio).
Really any conversion back from folio to page is an indication of a
problem. It might be necessary as a temporary step, but we _should_
have enough infrastructure in place now that filesystems don't need to
convert back to pages at any point. Although there's still
write_begin/write_end and some of the functions in buffer.c.
next prev parent reply other threads:[~2024-02-15 22:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-26 6:56 [PATCH] btrfs: Convert add_ra_bio_pages() to use a folio Matthew Wilcox (Oracle)
2024-01-29 14:55 ` Johannes Thumshirn
2024-02-15 22:04 ` Matthew Wilcox [this message]
2024-02-27 21:35 ` Matthew Wilcox
2024-02-27 21:52 ` Qu Wenruo
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=Zc6KfL1r-dxoAyVh@casper.infradead.org \
--to=willy@infradead.org \
--cc=Johannes.Thumshirn@wdc.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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