fuse: support io-uring registered buffers
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest8 patches 31 repliesIn review
Changes in v2 from the cover letter
* 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.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | io_uring/uring_cmd: add io_uring_cmd_import_fixed_full()include/ io_uring/ io_uring/ +1 more | +32 | 11 replies | |
| 2/8 | fuse: refactor io-uring logic for getting next fuse requestfs/ | +28 | 1 reply | |
| 3/8 | fuse: refactor io-uring header copying to ringfs/ | +20 | 2 replies | |
| 4/8 | fuse: refactor io-uring header copying from ringfs/ | +17 | 0 replies | |
| 5/8 | fuse: use enum types for header copyingfs/ | +45 | 3 replies | |
| 6/8 | fuse: add user_ prefix to userspace headers and payload fieldsfs/ fs/ | +10 | 3 replies | |
| 7/8 | fuse: refactor setting up copy state for payload copyingfs/ | +25 | 2 replies | |
| 8/8 | fuse: support io-uring registered buffersfs/ fs/ | +183 | 8 replies |
Reviews trailers per patch
4 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Caleb Sander Mateos | Bernd Schubert |
|---|---|---|
| 1/8 | R-b | |
| 2/8 | R-b | |
| 3/8 | ||
| 4/8 | ||
| 5/8 | R-b | |
| 6/8 | Reviwed-by | |
| 7/8 | R-b | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/8] fuse: support io-uring registered buffers
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/[email protected]/
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(-)
Signature · 1 line
2.47.3