public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] fuse: support large folios
@ 2024-11-25 22:05 Joanne Koong
  2024-11-25 22:05 ` [PATCH v2 01/12] fuse: support copying " Joanne Koong
                   ` (12 more replies)
  0 siblings, 13 replies; 28+ messages in thread
From: Joanne Koong @ 2024-11-25 22:05 UTC (permalink / raw)
  To: miklos, linux-fsdevel
  Cc: josef, bernd.schubert, jefflexu, willy, shakeel.butt, kernel-team

This patchset adds support for folios larger than one page size in FUSE.

This patchset is rebased on top of the (unmerged) patchset that removes temp
folios in writeback [1]. (There is also a version of this patchset that is
independent from that change, but that version has two additional patches
needed to account for temp folios and temp folio copying, which may require
some debate to get the API right for as these two patches add generic
(non-FUSE) helpers. For simplicity's sake for now, I sent out this patchset
version rebased on top of the patchset that removes temp pages)

This patchset was tested by running it through fstests on passthrough_hp.

Benchmarks show roughly a ~45% improvement in read throughput.

Benchmark setup:

-- Set up server --
 ./libfuse/build/example/passthrough_hp --bypass-rw=1 ~/libfuse
~/mounts/fuse/ --nopassthrough
(using libfuse patched with https://github.com/libfuse/libfuse/pull/807)

-- Run fio --
 fio --name=read --ioengine=sync --rw=read --bs=1M --size=1G
--numjobs=2 --ramp_time=30 --group_reporting=1
--directory=mounts/fuse/

Machine 1:
    No large folios:     ~4400 MiB/s
    Large folios:        ~7100 MiB/s

Machine 2:
    No large folios:     ~3700 MiB/s
    Large folios:        ~6400 MiB/s

Writes are still effectively one page size. Benchmarks showed that trying to get
the largest folios possible from __filemap_get_folio() is an over-optimization
and ends up being significantly more expensive. Fine-tuning for the optimal
order size for the __filemap_get_folio() calls can be done in a future patchset.

[1] https://lore.kernel.org/linux-fsdevel/20241107235614.3637221-1-joannelkoong@gmail.com/

Changelog:
v1: https://lore.kernel.org/linux-fsdevel/20241109001258.2216604-1-joannelkoong@gmail.com/
v1 -> v2:
* Change naming from "non-writeback write" to "writethrough write"
* Fix deadlock for writethrough writes by calling fault_in_iov_iter_readable() first
  before __filemap_get_folio() (Josef)
* For readahead, retain original folio_size() for descs.length (Josef)
* Use folio_zero_range() api in fuse_copy_folio() (Josef)
* Add Josef's reviewed-bys

Joanne Koong (12):
  fuse: support copying large folios
  fuse: support large folios for retrieves
  fuse: refactor fuse_fill_write_pages()
  fuse: support large folios for writethrough writes
  fuse: support large folios for folio reads
  fuse: support large folios for symlinks
  fuse: support large folios for stores
  fuse: support large folios for queued writes
  fuse: support large folios for readahead
  fuse: support large folios for direct io
  fuse: support large folios for writeback
  fuse: enable large folios

 fs/fuse/dev.c  | 128 ++++++++++++++++++++++++-------------------------
 fs/fuse/dir.c  |   8 ++--
 fs/fuse/file.c | 126 +++++++++++++++++++++++++++++++-----------------
 3 files changed, 149 insertions(+), 113 deletions(-)

-- 
2.43.5


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

end of thread, other threads:[~2025-01-08 21:03 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-25 22:05 [PATCH v2 00/12] fuse: support large folios Joanne Koong
2024-11-25 22:05 ` [PATCH v2 01/12] fuse: support copying " Joanne Koong
2024-11-25 22:05 ` [PATCH v2 02/12] fuse: support large folios for retrieves Joanne Koong
2024-11-25 22:05 ` [PATCH v2 03/12] fuse: refactor fuse_fill_write_pages() Joanne Koong
2024-11-25 22:05 ` [PATCH v2 04/12] fuse: support large folios for writethrough writes Joanne Koong
2024-11-25 22:05 ` [PATCH v2 05/12] fuse: support large folios for folio reads Joanne Koong
2024-11-25 22:05 ` [PATCH v2 06/12] fuse: support large folios for symlinks Joanne Koong
2024-11-25 22:05 ` [PATCH v2 07/12] fuse: support large folios for stores Joanne Koong
2024-11-25 22:05 ` [PATCH v2 08/12] fuse: support large folios for queued writes Joanne Koong
2024-11-25 22:05 ` [PATCH v2 09/12] fuse: support large folios for readahead Joanne Koong
2024-11-25 22:05 ` [PATCH v2 10/12] fuse: support large folios for direct io Joanne Koong
2024-12-09 15:50   ` Josef Bacik
2024-12-09 15:54     ` Matthew Wilcox
2024-12-11 21:04       ` Joanne Koong
2024-12-11 21:11         ` Matthew Wilcox
2024-12-11 21:35           ` Joanne Koong
2024-11-25 22:05 ` [PATCH v2 11/12] fuse: support large folios for writeback Joanne Koong
2024-11-25 22:05 ` [PATCH v2 12/12] fuse: enable large folios Joanne Koong
2024-12-06  9:50 ` [PATCH v2 00/12] fuse: support " Jingbo Xu
2024-12-06 17:41   ` Joanne Koong
2024-12-06 20:36     ` Shakeel Butt
2024-12-06 22:11       ` Joanne Koong
2024-12-06 22:27         ` Shakeel Butt
2024-12-06 22:33           ` Matthew Wilcox
2024-12-09 17:23             ` Shakeel Butt
2024-12-06 22:25     ` Matthew Wilcox
2024-12-10  0:31       ` Joanne Koong
2025-01-08 21:03         ` Joanne Koong

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