Skip to content

io_uring passthrough support

Jens Axboe io-uring linux-nvme 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest8 patches 16 repliesIn review

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8io_uring: split up io_uring_sqe into hdr + mainfs/io_uring.c include/uapi/linux/io_uring.h+48 -365 replies
2/8io_uring: add infrastructure around io_uring_cmd_sqe issue typefs/io_uring.c include/uapi/linux/io_uring.h+54 -130 replies
3/8fs: add file_operations->uring_cmd()fs/io_uring.c include/linux/fs.h+11 -54 replies
4/8io_uring: add support for IORING_OP_URING_CMDfs/io_uring.c include/linux/io_uring.h+70 -02 replies
5/8block: wire up support for file_operations->uring_cmd()block/blk-mq.c fs/block_dev.c include/linux/blk-mq.h +1 more+29 -01 reply
6/8block: add example ioctlfs/block_dev.c include/linux/blkdev.h+31 -03 replies
7/8net: wire up support for file_operations->uring_cmd()include/linux/net.h include/net/sock.h net/core/sock.c +6 more+43 -21 reply
8/8net: add example SOCKET_URING_OP_SIOCINQ/SOCKET_URING_OP_SIOCOUTQinclude/net/raw.h include/net/tcp.h include/net/udp.h +8 more+109 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

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