From: Joanne Koong <joannelkoong@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: hch@infradead.org, djwong@kernel.org, anuj1072538@gmail.com,
miklos@szeredi.hu, brauner@kernel.org, linux-xfs@vger.kernel.org,
kernel-team@meta.com
Subject: [PATCH v2 00/16] fuse: use iomap for buffered writes + writeback
Date: Fri, 13 Jun 2025 14:46:25 -0700 [thread overview]
Message-ID: <20250613214642.2903225-1-joannelkoong@gmail.com> (raw)
This series adds fuse iomap support for buffered writes and dirty folio
writeback. This is needed so that granular uptodate and dirty tracking can
be used in fuse when large folios are enabled. This has two big advantages.
Now for writes, instead of the entire folio needing to be read into the page
cache, only the relevant portions need to be. Now for writeback, only the
dirty portions need to be written back instead of the entire folio.
This patchset does 3 things, in order of sequence:
a) Decouple iomap/buffered-io.c code from the CONFIG_BLOCK dependency, as some
environments that run fuse may not have CONFIG_BLOCK set
b) Add support to iomap buffered io for generic write and writeback that is
not dependent on bios
c) Add fuse integration with iomap
Patches 3 and 5 are obviated by the refactoring done later on in patches 10
and 11 but I left this patchset in this order in the hopes of making it
more logically easier to follow.
This series was run through fstests with large folios enabled and through
some quick sanity checks on passthrough_hp with a) writing 1 GB in 1 MB chunks
and then going back and dirtying a few bytes in each chunk and b) writing 50
MB in 1 MB chunks and going through dirtying the entire chunk for several runs.
a) showed about a 40% speedup increase with iomap support added and b) showed
roughly the same performance.
This patchset does not enable large folios yet. That will be sent out in a
separate future patchset.
This series is on top of commit 27605c8c0 ("Merge tag 'net-6.16-rc2'...") in
the linux tree.
Thanks,
Joanne
Changeset
-------
v1 -> v2:
* Drop IOMAP_IN_MEM type and just use IOMAP_MAPPED for fuse
* Separate out new helper functions added to iomap into separate commits
* Update iomap documentation
* Clean up iomap_writeback_dirty_folio() locking logic w/ christoph's
recommendation
* Refactor ->map_blocks() to generic ->writeback_folio()
* Refactor ->submit_ioend() to generic ->writeback_complete()
* Add patch for changing 'count' to 'async_writeback'
* Rebase commits onto linux branch instead of fuse branch
v1: https://lore.kernel.org/linux-fsdevel/20250606233803.1421259-1-joannelkoong@gmail.com/
Joanne Koong (16):
iomap: move buffered io CONFIG_BLOCK dependent logic into separate
file
iomap: iomap_read_folio_sync() -> iomap_bio_read_folio_sync()
iomap: iomap_add_to_ioend() -> iomap_bio_add_to_ioend()
iomap: add wrapper function iomap_bio_readpage()
iomap: add wrapper function iomap_bio_ioend_error()
iomap: add wrapper function iomap_submit_bio()
iomap: decouple buffered-io.o from CONFIG_BLOCK
iomap: add read_folio_sync() handler for buffered writes
iomap: change 'count' to 'async_writeback'
iomap: replace ->map_blocks() with generic ->writeback_folio() for
writeback
iomap: replace ->submit_ioend() with generic ->writeback_complete()
for writeback
iomap: support more customized writeback handling
iomap: add iomap_writeback_dirty_folio()
fuse: use iomap for buffered writes
fuse: use iomap for writeback
fuse: use iomap for folio laundering
.../filesystems/iomap/operations.rst | 65 ++-
block/fops.c | 7 +-
fs/fuse/Kconfig | 1 +
fs/fuse/file.c | 308 +++++-------
fs/gfs2/bmap.c | 7 +-
fs/iomap/Makefile | 5 +-
fs/iomap/buffered-io-bio.c | 365 ++++++++++++++
fs/iomap/buffered-io.c | 471 +++---------------
fs/iomap/internal.h | 40 ++
fs/xfs/xfs_aops.c | 28 +-
fs/zonefs/file.c | 7 +-
include/linux/iomap.h | 88 +++-
12 files changed, 775 insertions(+), 617 deletions(-)
create mode 100644 fs/iomap/buffered-io-bio.c
--
2.47.1
next reply other threads:[~2025-06-13 21:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 21:46 Joanne Koong [this message]
2025-06-13 21:46 ` [PATCH v2 01/16] iomap: move buffered io CONFIG_BLOCK dependent logic into separate file Joanne Koong
2025-06-13 21:46 ` [PATCH v2 02/16] iomap: iomap_read_folio_sync() -> iomap_bio_read_folio_sync() Joanne Koong
2025-06-13 21:46 ` [PATCH v2 03/16] iomap: iomap_add_to_ioend() -> iomap_bio_add_to_ioend() Joanne Koong
2025-06-13 21:46 ` [PATCH v2 04/16] iomap: add wrapper function iomap_bio_readpage() Joanne Koong
2025-06-16 12:49 ` Christoph Hellwig
2025-06-16 19:18 ` Joanne Koong
2025-06-17 4:38 ` Christoph Hellwig
2025-06-17 17:20 ` Joanne Koong
2025-06-18 4:45 ` Christoph Hellwig
2025-06-18 19:17 ` Joanne Koong
2025-06-23 7:42 ` Christoph Hellwig
2025-06-23 20:53 ` Joanne Koong
2025-06-13 21:46 ` [PATCH v2 05/16] iomap: add wrapper function iomap_bio_ioend_error() Joanne Koong
2025-06-13 21:46 ` [PATCH v2 06/16] iomap: add wrapper function iomap_submit_bio() Joanne Koong
2025-06-13 21:46 ` [PATCH v2 07/16] iomap: decouple buffered-io.o from CONFIG_BLOCK Joanne Koong
2025-06-13 21:46 ` [PATCH v2 08/16] iomap: add read_folio_sync() handler for buffered writes Joanne Koong
2025-06-13 21:46 ` [PATCH v2 09/16] iomap: change 'count' to 'async_writeback' Joanne Koong
2025-06-16 12:52 ` Christoph Hellwig
2025-06-16 18:49 ` Joanne Koong
2025-06-13 21:46 ` [PATCH v2 10/16] iomap: replace ->map_blocks() with generic ->writeback_folio() for writeback Joanne Koong
2025-06-16 12:54 ` Christoph Hellwig
2025-06-13 21:46 ` [PATCH v2 11/16] iomap: replace ->submit_ioend() with generic ->writeback_complete() " Joanne Koong
2025-06-13 21:46 ` [PATCH v2 12/16] iomap: support more customized writeback handling Joanne Koong
2025-06-13 21:46 ` [PATCH v2 13/16] iomap: add iomap_writeback_dirty_folio() Joanne Koong
2025-06-13 21:46 ` [PATCH v2 14/16] fuse: use iomap for buffered writes Joanne Koong
2025-06-13 21:46 ` [PATCH v2 15/16] fuse: use iomap for writeback Joanne Koong
2025-06-13 21:46 ` [PATCH v2 16/16] fuse: use iomap for folio laundering 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=20250613214642.2903225-1-joannelkoong@gmail.com \
--to=joannelkoong@gmail.com \
--cc=anuj1072538@gmail.com \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=kernel-team@meta.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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;
as well as URLs for NNTP newsgroup(s).