From: Christoph Hellwig <hch@infradead.org>
To: Boris Burkov <boris@bur.io>
Cc: Christoph Hellwig <hch@infradead.org>,
Dimitrios Apostolou <jimis@gmx.net>,
linux-btrfs@vger.kernel.org, Qu Wenruo <quwenruo.btrfs@gmx.com>,
Anand Jain <anand.jain@oracle.com>,
Matthew Wilcox <willy@infradead.org>
Subject: Re: Sequential read(8K) from compressed files are very slow
Date: Wed, 4 Jun 2025 21:35:55 -0700 [thread overview]
Message-ID: <aEEeq700fw8T_lB4@infradead.org> (raw)
In-Reply-To: <20250604214919.GA1123965@zen.localdomain>
On Wed, Jun 04, 2025 at 02:49:19PM -0700, Boris Burkov wrote:
> unlocked the perf on the compressed 8k (and 4k) case without regressing
> 128k or bs=1M for a file with enormous extents. I get 1.4GB/s on both.
> Still less on the incompressible file (though higher than without the
> patch. 900MB/s vs 600MB/s)
>
> I don't think this really perfectly makes sense for an actually proper
> version, as readahead_folio() will advance the index and we will keep
> "expanding" it to be the size of the compressed extent_map. On the other
> hand, if it is stupid and it works, is it stupid?
The way readahead_expand works is that it should basically be no-op
in that case as the two while loops doing the actual work are skipped.
But it might be worth double checking that this is really the case.
You'll probably also want to remove add_ra_bio_pages entirely.
> Very promising... I'm going to study this API further and try to make
> a real version. Very open to ideas/advice on how the API is best meant
> to be used and if this result might be "cheating" in some way.
As far as I can tell this is how it is intended to be used.
next prev parent reply other threads:[~2025-06-05 4:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 19:56 Sequential read(8K) from compressed files are very slow Dimitrios Apostolou
2025-06-04 1:36 ` Boris Burkov
2025-06-04 6:22 ` Christoph Hellwig
2025-06-04 18:03 ` Boris Burkov
2025-06-04 21:49 ` Boris Burkov
2025-06-05 4:35 ` Christoph Hellwig [this message]
2025-06-05 17:09 ` Dimitrios Apostolou
2025-06-07 0:37 ` Boris Burkov
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=aEEeq700fw8T_lB4@infradead.org \
--to=hch@infradead.org \
--cc=anand.jain@oracle.com \
--cc=boris@bur.io \
--cc=jimis@gmx.net \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=willy@infradead.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