public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] Large folio support: iomap framework changes versus filesystem-specific implementations
@ 2026-02-20 12:59 Nanzhe Zhao
  2026-02-20 15:48 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Nanzhe Zhao @ 2026-02-20 12:59 UTC (permalink / raw)
  To: lsf-pc
  Cc: linux-fsdevel, Christoph Hellwig, willy, yi.zhang, jaegeuk,
	Chao Yu, Barry Song, wqu

Large folios can reduce per-page overhead and improve throughput for large buffered I/O, but enabling them in filesystems is not a mechanical “page → folio” conversion. The core difficulty is preserving correctness and performance when a folio must maintain subrange state, while existing filesystem code paths and the iomap buffered I/O framework make different assumptions about state tracking, locking lifetime, block mapping, and writeback semantics.

This session proposes a cross-filesystem discussion around two directions that are actively being explored:

Iomap approach: adopt iomap buffered I/O paths and benefit from iomap-style subrange folio state machinery. However, much of this machinery lives as static helpers inside iomap’s implementation (e.g., in buffered-io.c) and is not available as a reusable API, which pushes filesystems toward re-implementing similar logic. Moreover, iomap’s per-folio state relies on folio-private metadata storage, which can clash with filesystem-specific folio-private usage.


Native fs approach: keep native buffered I/O paths and implement filesystem-specific folio_state tracking and helpers to avoid whole-folio dirtying/write amplification and to match filesystem-private metadata (e.g., private flags). This avoids some iomap integration constraints and preserves filesystem-specific optimizations, but it increases filesystem-local complexity and long-term maintenance cost.


Using f2fs as a concrete instance (log-structured, indirect-pointer mapping, private folio flags), this session consolidates two recurring issues relevant across filesystems:

Per-folio state tracking: iomap subrange-state API exposure vs filesystem-local solution.
COW writeback support: minimal iomap extensions vs filesystem-local writeback for COW paths.

The goal is to converge on recommended design patterns and actionable next steps for f2fs/ext4/btrfs/others to enable large folios without correctness risks or performance regressions.

Best regards,
Nanzhe Zhao

Related Patches for Large Folios:

f2fs:
- https://lore.kernel.org/all/20250813092131.44762-1-nzzhao@126.com/
- https://lore.kernel.org/linux-f2fs-devel/20251120235446.1947532-1-jaegeuk@kernel.org/
- https://lore.kernel.org/linux-f2fs-devel/20260203091256.854842-1-nzzhao@126.com/

ext4:
- https://lore.kernel.org/all/20250512063319.3539411-1-yi.zhang@huaweicloud.com/

btrfs:
- https://lore.kernel.org/all/676154e5415d8d15499fb8c02b0eabbb1c6cef26.1745403878.git.wqu@suse.com/

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

end of thread, other threads:[~2026-02-27 19:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20 12:59 [LSF/MM/BPF TOPIC] Large folio support: iomap framework changes versus filesystem-specific implementations Nanzhe Zhao
2026-02-20 15:48 ` Christoph Hellwig
2026-02-20 18:40   ` Matthew Wilcox
2026-02-23 21:36     ` Jaegeuk Kim
2026-02-26 10:13       ` Barry Song
2026-02-27  2:02         ` Jaegeuk Kim
2026-02-27  2:43           ` Barry Song
2026-02-27 19:25             ` Jaegeuk Kim
2026-02-20 17:07 ` [Lsf-pc] " Jan Kara
2026-02-23  8:34 ` Iomap and compression? (Was "Re: [LSF/MM/BPF TOPIC] Large folio support: iomap framework changes versus filesystem-specific implementations") Qu Wenruo
2026-02-23 13:06   ` Christoph Hellwig
2026-02-23 21:53     ` Qu Wenruo
2026-02-24 14:58       ` Christoph Hellwig

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