linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] fuse: support io-uring registered buffers
@ 2025-10-27 22:27 Joanne Koong
  2025-10-27 22:28 ` [PATCH v2 1/8] io_uring/uring_cmd: add io_uring_cmd_import_fixed_full() Joanne Koong
                   ` (7 more replies)
  0 siblings, 8 replies; 31+ messages in thread
From: Joanne Koong @ 2025-10-27 22:27 UTC (permalink / raw)
  To: miklos, axboe
  Cc: linux-fsdevel, bschubert, asml.silence, io-uring, xiaobing.li,
	csander, kernel-team

This patchset adds fuse support for io-uring registered buffers.
Daemons may register buffers ahead of time, which will eliminate the overhead
of pinning/unpinning user pages and translating virtual addresses for every
server-kernel interaction.

The main logic for fuse registered buffers is in the last patch (patch 8/8).
Patch 1/8 adds an io_uring api for fetching the registered buffer and patches
(2-7)/8 refactors the fuse io_uring code, which additionally will make adding
in the logic for registered buffers neater.

The libfuse changes can be found in this branch:
https://github.com/joannekoong/libfuse/tree/registered_buffers. The libfuse
implementation first tries registered buffers during registration and if this
fails, will retry with non-registered buffers. This prevents having to add a
new init flag (but does have the downside of printing dmesg errors for the
failed registrations when trying the registered buffers). If using registered
buffers and the daemon for whatever reason unregisters the buffers midway
through, then this will sever server-kernel communication. Libfuse will never
do this. Libfuse will only unregister the buffers when the entire session is
being destroyed.

Benchmarks will be run and posted.

Thanks,
Joanne

v1: https://lore.kernel.org/linux-fsdevel/20251022202021.3649586-1-joannelkoong@gmail.com/
v1 -> v2:
* Add io_uring_cmd_import_fixed_full() patch
* Construct iter using io_uring_cmd_import_fixed_full() per cmd instead of recyling
  iters.
* Kmap the header instead of using bvec iter for iterating/copying. This makes
  the code easier to read.

Joanne Koong (8):
  io_uring/uring_cmd: add io_uring_cmd_import_fixed_full()
  fuse: refactor io-uring logic for getting next fuse request
  fuse: refactor io-uring header copying to ring
  fuse: refactor io-uring header copying from ring
  fuse: use enum types for header copying
  fuse: add user_ prefix to userspace headers and payload fields
  fuse: refactor setting up copy state for payload copying
  fuse: support io-uring registered buffers

 fs/fuse/dev_uring.c          | 366 +++++++++++++++++++++++++----------
 fs/fuse/dev_uring_i.h        |  27 ++-
 include/linux/io_uring/cmd.h |   3 +
 io_uring/rsrc.c              |  14 ++
 io_uring/rsrc.h              |   2 +
 io_uring/uring_cmd.c         |  13 ++
 6 files changed, 316 insertions(+), 109 deletions(-)

-- 
2.47.3


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

end of thread, other threads:[~2025-11-06 19:48 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 22:27 [PATCH v2 0/8] fuse: support io-uring registered buffers Joanne Koong
2025-10-27 22:28 ` [PATCH v2 1/8] io_uring/uring_cmd: add io_uring_cmd_import_fixed_full() Joanne Koong
2025-10-28  1:28   ` Caleb Sander Mateos
2025-10-29 14:01   ` Pavel Begunkov
2025-10-29 18:37     ` Joanne Koong
2025-10-29 19:59       ` Bernd Schubert
2025-10-30 17:42         ` Pavel Begunkov
2025-10-30 18:06       ` Pavel Begunkov
2025-10-30 22:23         ` Bernd Schubert
2025-10-30 23:50           ` Joanne Koong
2025-10-31 10:27             ` Bernd Schubert
2025-10-31 21:19               ` Joanne Koong
2025-10-30 23:13         ` Joanne Koong
2025-10-27 22:28 ` [PATCH v2 2/8] fuse: refactor io-uring logic for getting next fuse request Joanne Koong
2025-10-30 23:07   ` Bernd Schubert
2025-10-27 22:28 ` [PATCH v2 3/8] fuse: refactor io-uring header copying to ring Joanne Koong
2025-10-30 23:15   ` Bernd Schubert
2025-10-30 23:52     ` Joanne Koong
2025-10-27 22:28 ` [PATCH v2 4/8] fuse: refactor io-uring header copying from ring Joanne Koong
2025-10-27 22:28 ` [PATCH v2 5/8] fuse: use enum types for header copying Joanne Koong
2025-11-05 23:01   ` Bernd Schubert
2025-10-27 22:28 ` [PATCH v2 6/8] fuse: add user_ prefix to userspace headers and payload fields Joanne Koong
2025-10-28  1:32   ` Caleb Sander Mateos
2025-10-28 23:56     ` Joanne Koong
2025-11-06 13:35   ` Bernd Schubert
2025-10-27 22:28 ` [PATCH v2 7/8] fuse: refactor setting up copy state for payload copying Joanne Koong
2025-11-06 16:53   ` Bernd Schubert
2025-10-27 22:28 ` [PATCH v2 8/8] fuse: support io-uring registered buffers Joanne Koong
2025-10-28  1:42   ` Caleb Sander Mateos
2025-10-28 23:56     ` Joanne Koong
2025-11-06 19:48   ` Bernd Schubert

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).