Please enable JavaScript.
Coggle requires JavaScript to display documents.
io_uring fused command for ublk zc - Coggle Diagram
io_uring fused command for ublk zc
core ideas
decouple master with slave by registered buffer table
buffer
per device
fuse commnd
sqe128 vs normal sqe
fused command extention
multiple slaves
core problems
zero copy for ublk/fuse device
ublk/fuse device owns io buffer
application needs to run IO via ublk/fuse io buffer for completing device IO
ublk/fuse io buffer lifetime
what is the buffer
fuse
FS IO from userspace FS
ublk
IO buffer from /dev/ublkbN
described by bio/bvec
buffer reference
the buffer can be used for many times in io lifetime
each time, we pass buffer reference to io_uring for running IO
io_uring_bvec_buf
reference safety
buffer reference can't outlive buffer
slice isn't good for ublk/fuse zero copy?
core requirement
fuse/ublk buffer page can't be referred after io is completed
both app and page cache doesn't expect page still can be changed after READ IO is completed
ublk is one driver
fuse is one userspace FS
buffer direction constraint
write reqeuest
buffer can only be source for running IO
read request
buffer should be destination only
otherwise kernel data leak issue
support to retrieve any part of the buffer
sub-buffer can be run IO multiple times
typical use case is logical volume manager(mirror, stripped, ...) and distributed network storage
how to move on
predication
Pavel's idea
register buffers
device buffers
runtime & io buffer
register kernel buffers
zc recv
need userspace to handle packet
so fused command may not fit
extend to export buffer via fused command
register ebpf helper with op
timeout