io_uring passthrough support
Get series with b4
b4 am [email protected]Versions newest first
- v4 Latest8 patches 16 repliesIn review
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | io_uring: split up io_uring_sqe into hdr + mainfs/ include/ | +48 | 5 replies | |
| 2/8 | io_uring: add infrastructure around io_uring_cmd_sqe issue typefs/ include/ | +54 | 0 replies | |
| 3/8 | fs: add file_operations->uring_cmd()fs/ include/ | +11 | 4 replies | |
| 4/8 | io_uring: add support for IORING_OP_URING_CMDfs/ include/ | +70 | 2 replies | |
| 5/8 | block: wire up support for file_operations->uring_cmd()block/ fs/ include/ +1 more | +29 | 1 reply | |
| 6/8 | block: add example ioctlfs/ include/ | +31 | 3 replies | |
| 7/8 | net: wire up support for file_operations->uring_cmd()include/ include/ net/ +6 more | +43 | 1 reply | |
| 8/8 | net: add example SOCKET_URING_OP_SIOCINQ/SOCKET_URING_OP_SIOCOUTQinclude/ include/ include/ +8 more | +109 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCHSET v4 0/8] io_uring passthrough support
Hi,
I fiddled a bit with the v3 repo, and came up with what I think is a better solution. Basically we split the io_uring_sqe into a header part, and then a main part. io_uring_sqe remains the same, obviously, but io_uring_cmd_sqe is then the sqe for these kinds of passthrough payloads.
In turn, consumers of that can then overlay on io_uring_cmd_sqe. Since I think we need the personality in there, we may as well add op and len as most/all will want that too. That leaves 40 bytes that can be used freely. That may not seem like much, but remember that's 40 bytes outside of the fd, len, and command op.
I updated and tested the block ioctl example, but didn't update the net side outside of needing a tweak on the net command. Outside of that, it should work like before.
I'd be interested in feedback on this approach. My main goal is to make this flexible enough to be useful, but also fast enough to be useful. That means no extra allocations if at all avoidable, and even being wary of adding extra branches to the io_uring hot path. With this series, we don't do the nasty split in io_init_req() anymore, which I really disliked in the previous series.
This is by no means perfect yet, but I do think it's better than v3 by quite a lot. So please send feedback and comments, I'd like to get this moving forward as we have various folks already lined up to use it...
Kanchan, can you try and address the NVMe feedback and rebase on top of this branch? Thanks!
You can also find this branch here:
https://git.kernel.dk/cgit/linux-block/log/?h=io_uring-fops.v4
block/blk-mq.c | 11 +++ fs/block_dev.c | 30 ++++++ fs/io_uring.c | 181 ++++++++++++++++++++++++---------- include/linux/blk-mq.h | 6 ++ include/linux/blkdev.h | 13 +++ include/linux/fs.h | 11 +++ include/linux/io_uring.h | 16 +++ include/linux/net.h | 2 + include/net/raw.h | 3 + include/net/sock.h | 6 ++ include/net/tcp.h | 2 + include/net/udp.h | 2 + include/uapi/linux/io_uring.h | 21 ++++ include/uapi/linux/net.h | 17 ++++ net/core/sock.c | 17 +++- net/dccp/ipv4.c | 1 + net/ipv4/af_inet.c | 3 + net/ipv4/raw.c | 27 +++++ net/ipv4/tcp.c | 36 +++++++ net/ipv4/tcp_ipv4.c | 1 + net/ipv4/udp.c | 18 ++++ net/ipv6/raw.c | 1 + net/ipv6/tcp_ipv6.c | 1 + net/ipv6/udp.c | 1 + net/l2tp/l2tp_ip.c | 1 + net/mptcp/protocol.c | 1 + net/sctp/protocol.c | 1 + net/socket.c | 13 +++ 28 files changed, 391 insertions(+), 52 deletions(-)
Signature · 9 lines
Jens Axboe _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme