From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/5] btrfs: prepare for larger folios support
Date: Thu, 20 Feb 2025 19:52:21 +1030 [thread overview]
Message-ID: <cover.1740043233.git.wqu@suse.com> (raw)
This means:
- Our subpage routine should check against the folio size other than
PAGE_SIZE
- Make functions handling filemap folios to use folio_size() other than
PAGE_SIZE
The most common paths are:
* Buffered reads/writes
* Uncompressed folio writeback
Already handled pretty well
* Compressed read
* Compressed write
To take full advantage of larger folios, we should use folio_iter
other than bvec_iter.
This will be a dedicated patchset, and the existing bvec_iter can
still handle larger folios.
Internal usages can still use page sized folios, or even pages,
including:
* Encoded reads/writes
* Compressed folios
* RAID56 internal pages
* Scrub internal pages
This patchset will handle the above mentioned points by:
- Prepare the subpage routine to handle larger folios
This will introduce a small overhead, as all checks are against folio
sizes, even on x86_64 we can no longer skip subpage completely.
This is done in the first patch.
- Convert straightforward PAGE_SIZE users to use folio_size()
This is done in the remaining patches.
Currently this patchset is not a exhaustive conversion, I'm pretty sure
there are other complex situations which can cause problems.
Those problems can only be exposed and fixed after switching on the
experimental larger folios support later.
Qu Wenruo (5):
btrfs: prepare subpage.c for larger folios support
btrfs: remove the PAGE_SIZE usage inside inline extent reads
btrfs: prepare btrfs_launcher_folio() for larger folios support
btrfs: prepare extent_io.c for future larger folio support
btrfs: prepare btrfs_page_mkwrite() for larger folios
fs/btrfs/extent_io.c | 50 +++++++++++++++++++++++++-------------------
fs/btrfs/file.c | 19 +++++++++--------
fs/btrfs/inode.c | 8 +++----
fs/btrfs/subpage.c | 36 +++++++++++++++----------------
fs/btrfs/subpage.h | 24 ++++++++-------------
5 files changed, 69 insertions(+), 68 deletions(-)
--
2.48.1
next reply other threads:[~2025-02-20 9:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 9:22 Qu Wenruo [this message]
2025-02-20 9:22 ` [PATCH 1/5] btrfs: prepare subpage.c for larger folios support Qu Wenruo
2025-02-21 12:06 ` Johannes Thumshirn
2025-02-22 5:03 ` Qu Wenruo
2025-02-20 9:22 ` [PATCH 2/5] btrfs: remove the PAGE_SIZE usage inside inline extent reads Qu Wenruo
2025-02-21 11:37 ` Johannes Thumshirn
2025-02-20 9:22 ` [PATCH 3/5] btrfs: prepare btrfs_launcher_folio() for larger folios support Qu Wenruo
2025-02-21 12:08 ` Johannes Thumshirn
2025-02-20 9:22 ` [PATCH 4/5] btrfs: prepare extent_io.c for future larger folio support Qu Wenruo
2025-02-21 12:12 ` Johannes Thumshirn
2025-02-22 5:02 ` Qu Wenruo
2025-02-25 18:41 ` Nathan Chancellor
2025-02-20 9:22 ` [PATCH 5/5] btrfs: prepare btrfs_page_mkwrite() for larger folios Qu Wenruo
2025-02-21 12:22 ` Johannes Thumshirn
2025-02-21 11:23 ` [PATCH 0/5] btrfs: prepare for larger folios support Johannes Thumshirn
2025-02-21 12:34 ` Filipe Manana
2025-02-21 22:33 ` 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=cover.1740043233.git.wqu@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.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