All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/9] fuse: add io-uring buffer rings and zero-copy
@ 2026-03-24 22:45 Joanne Koong
  2026-03-24 22:45 ` [PATCH v1 1/9] fuse: separate next request fetching from sending logic Joanne Koong
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Joanne Koong @ 2026-03-24 22:45 UTC (permalink / raw)
  To: axboe; +Cc: miklos, bschubert, linux-fsdevel

This series adds buffer ring and zero-copy capabilities to fuse over io-uring.

Using buffer rings has two benefits:
a) eliminates the overhead of pinning/unpinning user pages and
translating virtual addresses for every server-kernel interaction

b) reduces the amount of memory needed for the buffers per queue.
Incremental buffer consumption, when added, will allow non-overlapping
regions of a buffer to be used simultaneously across multiple requests.

Using zero-copy (only for privileged servers) eliminates the memory copies
between kernel and userspace for read/write/payload-heavy operations by
allowing the server to directly operate on the client's underlying pages.

This series has a dependency on io-uring kernel-managed buffer rings [1] and
the io-uring registered bvec buffers changes in [2]. It contains the fuse
changes carried over from the larger series in [3]. Because of the heavy
dependency on the io-uring changes, this series is submitted against Jens's
io-uring tree instead of Miklos's fuse tree.

This series has the following changes from [3]:
* uses a registered memory region for headers instead of a fixed buffer.
  This avoids the overhead of fixed buffer lookups and having to do a
  refcounting dance on every i/o
* adds folio reference acquisition for pages registered into the bvec (and the
  corresponding release callback) to account for the case where a server is
  forcibly unmounted while non-fuse io-uring requests using those pages are
  in-flight

Benchmarks for zero-copy showed approximately the following differences in
throughput for bs=1M:

direct randreads: ~20% increase (~2100 MB/s -> ~2600 MB/s)
buffered randreads: ~25% increase (~1900 MB/s -> 2400 MB/s)
direct randwrites: no difference (~750 MB/s)
buffered randwrites: ~10% increase (950 MB/s -> 1050 MB/s)

The benchmark was run using fio on the passthrough_hp server:
fio --name=test_run --ioengine=sync --rw=rand{read,write} --bs=1M
--size=1G --numjobs=2 --ramp_time=30 --group_reporting=1

The libfuse changes can be found in [4]. This has a dependency on the liburing
changes in [5]. To test the server, you can run it with:
sudo ~/libfuse/build/example/passthrough_hp ~/src ~/mounts/tmp
--nopassthrough -o io_uring_zero_copy -o io_uring_q_depth=8
Once this series is merged, the libfuse changes will be tidied up and
submitted upstream.

Thanks,
Joanne 

[1] https://lore.kernel.org/linux-fsdevel/20260306003224.3620942-1-joannelkoong@gmail.com/
[2] https://lore.kernel.org/io-uring/20260324221426.3436334-1-joannelkoong@gmail.com/
[3] https://lore.kernel.org/linux-fsdevel/20260116233044.1532965-1-joannelkoong@gmail.com/
[4] https://github.com/joannekoong/libfuse/tree/zero_copy
[5] https://github.com/joannekoong/liburing/commits/pbuf_kernel_managed/

Joanne Koong (9):
  fuse: separate next request fetching from sending logic
  fuse: refactor io-uring header copying to ring
  fuse: refactor io-uring header copying from ring
  fuse: use enum types for header copying
  fuse: refactor setting up copy state for payload copying
  fuse: support buffer copying for kernel addresses
  fuse: add io-uring kernel-managed buffer ring
  fuse: add zero-copy over io-uring
  docs: fuse: add io-uring bufring and zero-copy documentation

 .../filesystems/fuse/fuse-io-uring.rst        |  61 +-
 fs/fuse/dev.c                                 |  32 +-
 fs/fuse/dev_uring.c                           | 696 ++++++++++++++----
 fs/fuse/dev_uring_i.h                         |  50 +-
 fs/fuse/fuse_dev_i.h                          |   8 +-
 include/uapi/linux/fuse.h                     |  20 +-
 6 files changed, 707 insertions(+), 160 deletions(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-03-31 21:30 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 22:45 [PATCH v1 0/9] fuse: add io-uring buffer rings and zero-copy Joanne Koong
2026-03-24 22:45 ` [PATCH v1 1/9] fuse: separate next request fetching from sending logic Joanne Koong
2026-03-24 22:45 ` [PATCH v1 2/9] fuse: refactor io-uring header copying to ring Joanne Koong
2026-03-24 22:45 ` [PATCH v1 3/9] fuse: refactor io-uring header copying from ring Joanne Koong
2026-03-24 22:45 ` [PATCH v1 4/9] fuse: use enum types for header copying Joanne Koong
2026-03-24 22:45 ` [PATCH v1 5/9] fuse: refactor setting up copy state for payload copying Joanne Koong
2026-03-24 22:45 ` [PATCH v1 6/9] fuse: support buffer copying for kernel addresses Joanne Koong
2026-03-24 22:45 ` [PATCH v1 7/9] fuse: add io-uring kernel-managed buffer ring Joanne Koong
2026-03-28 12:21   ` kernel test robot
2026-03-28 12:54   ` kernel test robot
2026-03-28 13:27   ` kernel test robot
2026-03-30 21:28   ` Bernd Schubert
2026-03-30 23:19     ` Joanne Koong
2026-03-31 21:30       ` Bernd Schubert
2026-03-24 22:45 ` [PATCH v1 8/9] fuse: add zero-copy over io-uring Joanne Koong
2026-03-28 13:02   ` kernel test robot
2026-03-28 13:53   ` kernel test robot
2026-03-30 15:43     ` Joanne Koong
2026-03-31  3:35       ` Philip Li
2026-03-24 22:45 ` [PATCH v1 9/9] docs: fuse: add io-uring bufring and zero-copy documentation Joanne Koong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.