From: Matthew Wilcox <willy@infradead.org>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: Jingbo Xu <jefflexu@linux.alibaba.com>,
miklos@szeredi.hu, linux-fsdevel@vger.kernel.org,
josef@toxicpanda.com, bernd.schubert@fastmail.fm,
shakeel.butt@linux.dev, kernel-team@meta.com
Subject: Re: [PATCH v2 00/12] fuse: support large folios
Date: Fri, 6 Dec 2024 22:25:23 +0000 [thread overview]
Message-ID: <Z1N505RCcH1dXlLZ@casper.infradead.org> (raw)
In-Reply-To: <CAJnrk1bwat_r4+pmhaWH-ThAi+zoAJFwmJG65ANj1Zv0O0s4_A@mail.gmail.com>
On Fri, Dec 06, 2024 at 09:41:25AM -0800, Joanne Koong wrote:
> On Fri, Dec 6, 2024 at 1:50 AM Jingbo Xu <jefflexu@linux.alibaba.com> wrote:
> > - folio = __filemap_get_folio(mapping, index, FGP_WRITEBEGIN,
> > + folio = __filemap_get_folio(mapping, index, FGP_WRITEBEGIN |
> > fgf_set_order(len),
> >
> > Otherwise the large folio is not enabled on the buffer write path.
> >
> >
> > Besides, when applying the above diff, the large folio is indeed enabled
> > but it suffers severe performance regression:
> >
> > fio 1 job buffer write:
> > 2GB/s BW w/o large folio, and 200MB/s BW w/ large folio
>
> This is the behavior I noticed as well when running some benchmarks on
> v1 [1]. I think it's because when we call into __filemap_get_folio(),
> we hit the FGP_CREAT path and if the order we set is too high, the
> internal call to filemap_alloc_folio() will repeatedly fail until it
> finds an order it's able to allocate (eg the do { ... } while (order--
> > min_order) loop).
But this is very different frrom what other filesystems have measured
when allocating large folios during writes. eg:
https://lore.kernel.org/linux-fsdevel/20240527163616.1135968-1-hch@lst.de/
So we need to understand what's different about fuse. My suspicion is
that it's disabling some other optimisation that is only done on
order 0 folios, but that's just wild speculation. Needs someone to
dig into it and look at profiles to see what's really going on.
next prev parent reply other threads:[~2024-12-06 22:25 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 22:05 [PATCH v2 00/12] fuse: support large folios Joanne Koong
2024-11-25 22:05 ` [PATCH v2 01/12] fuse: support copying " Joanne Koong
2024-11-25 22:05 ` [PATCH v2 02/12] fuse: support large folios for retrieves Joanne Koong
2024-11-25 22:05 ` [PATCH v2 03/12] fuse: refactor fuse_fill_write_pages() Joanne Koong
2024-11-25 22:05 ` [PATCH v2 04/12] fuse: support large folios for writethrough writes Joanne Koong
2024-11-25 22:05 ` [PATCH v2 05/12] fuse: support large folios for folio reads Joanne Koong
2024-11-25 22:05 ` [PATCH v2 06/12] fuse: support large folios for symlinks Joanne Koong
2024-11-25 22:05 ` [PATCH v2 07/12] fuse: support large folios for stores Joanne Koong
2024-11-25 22:05 ` [PATCH v2 08/12] fuse: support large folios for queued writes Joanne Koong
2024-11-25 22:05 ` [PATCH v2 09/12] fuse: support large folios for readahead Joanne Koong
2024-11-25 22:05 ` [PATCH v2 10/12] fuse: support large folios for direct io Joanne Koong
2024-12-09 15:50 ` Josef Bacik
2024-12-09 15:54 ` Matthew Wilcox
2024-12-11 21:04 ` Joanne Koong
2024-12-11 21:11 ` Matthew Wilcox
2024-12-11 21:35 ` Joanne Koong
2024-11-25 22:05 ` [PATCH v2 11/12] fuse: support large folios for writeback Joanne Koong
2024-11-25 22:05 ` [PATCH v2 12/12] fuse: enable large folios Joanne Koong
2024-12-06 9:50 ` [PATCH v2 00/12] fuse: support " Jingbo Xu
2024-12-06 17:41 ` Joanne Koong
2024-12-06 20:36 ` Shakeel Butt
2024-12-06 22:11 ` Joanne Koong
2024-12-06 22:27 ` Shakeel Butt
2024-12-06 22:33 ` Matthew Wilcox
2024-12-09 17:23 ` Shakeel Butt
2024-12-06 22:25 ` Matthew Wilcox [this message]
2024-12-10 0:31 ` Joanne Koong
2025-01-08 21:03 ` 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=Z1N505RCcH1dXlLZ@casper.infradead.org \
--to=willy@infradead.org \
--cc=bernd.schubert@fastmail.fm \
--cc=jefflexu@linux.alibaba.com \
--cc=joannelkoong@gmail.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@meta.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=shakeel.butt@linux.dev \
/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