public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] btrfs: prepare for larger folios support
@ 2025-03-10  7:35 Qu Wenruo
  2025-03-10  7:35 ` [PATCH 1/6] btrfs: subpage: make btrfs_is_subpage() check against a folio Qu Wenruo
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Qu Wenruo @ 2025-03-10  7:35 UTC (permalink / raw)
  To: linux-btrfs

[CHANGELOG]
v2:
- Split the subpage.[ch] modification into 3 patches
- Rebased the latest for-next branch
  Now all dependency are in for-next.

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 (6):
  btrfs: subpage: make btrfs_is_subpage() check against a folio
  btrfs: add a @fsize parameter to btrfs_alloc_subpage()
  btrfs: replace PAGE_SIZE with folio_size for subpage.[ch]
  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 | 49 ++++++++++++++++++++++++--------------------
 fs/btrfs/file.c      | 19 +++++++++--------
 fs/btrfs/inode.c     |  4 ++--
 fs/btrfs/subpage.c   | 38 +++++++++++++++++-----------------
 fs/btrfs/subpage.h   | 16 +++++++--------
 5 files changed, 66 insertions(+), 60 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-03-13 20:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10  7:35 [PATCH v2 0/6] btrfs: prepare for larger folios support Qu Wenruo
2025-03-10  7:35 ` [PATCH 1/6] btrfs: subpage: make btrfs_is_subpage() check against a folio Qu Wenruo
2025-03-10  7:35 ` [PATCH 2/6] btrfs: add a @fsize parameter to btrfs_alloc_subpage() Qu Wenruo
2025-03-10  7:35 ` [PATCH 3/6] btrfs: replace PAGE_SIZE with folio_size for subpage.[ch] Qu Wenruo
2025-03-10  7:36 ` [PATCH 4/6] btrfs: prepare btrfs_launcher_folio() for larger folios support Qu Wenruo
2025-03-10  7:36 ` [PATCH 5/6] btrfs: prepare extent_io.c for future larger folio support Qu Wenruo
2025-03-10 23:27   ` Boris Burkov
2025-03-10 23:51     ` Qu Wenruo
2025-03-10  7:36 ` [PATCH 6/6] btrfs: prepare btrfs_page_mkwrite() for larger folios Qu Wenruo
2025-03-10 23:32 ` [PATCH v2 0/6] btrfs: prepare for larger folios support Boris Burkov
2025-03-10 23:56   ` Qu Wenruo
2025-03-11 10:25 ` Johannes Thumshirn
2025-03-12 13:44 ` David Sterba
2025-03-13 15:21   ` Nathan Chancellor
2025-03-13 20:50     ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox