From: Jens Axboe <[email protected]>
To: [email protected]
Cc: [email protected], [email protected], [email protected],
[email protected], [email protected]
Subject: [PATCHSET v4 0/8] io_uring passthrough support
Date: Wed, 17 Mar 2021 16:10:19 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
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(-)
--
Jens Axboe
next reply other threads:[~2021-03-17 22:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 22:10 Jens Axboe [this message]
2021-03-17 22:10 ` [PATCH 1/8] io_uring: split up io_uring_sqe into hdr + main Jens Axboe
2021-03-18 5:34 ` Christoph Hellwig
2021-03-18 18:40 ` Jens Axboe
2021-03-19 11:20 ` Stefan Metzmacher
2021-03-19 13:29 ` Christoph Hellwig
2022-02-24 22:34 ` Luis Chamberlain
2021-03-17 22:10 ` [PATCH 2/8] io_uring: add infrastructure around io_uring_cmd_sqe issue type Jens Axboe
2021-03-17 22:10 ` [PATCH 3/8] fs: add file_operations->uring_cmd() Jens Axboe
2021-03-18 5:38 ` Christoph Hellwig
2021-03-18 18:41 ` Jens Axboe
2022-02-17 1:27 ` Luis Chamberlain
2022-02-17 1:25 ` Luis Chamberlain
2021-03-17 22:10 ` [PATCH 4/8] io_uring: add support for IORING_OP_URING_CMD Jens Axboe
2021-03-18 5:42 ` Christoph Hellwig
2021-03-18 18:43 ` Jens Axboe
2021-03-17 22:10 ` [PATCH 5/8] block: wire up support for file_operations->uring_cmd() Jens Axboe
2021-03-18 5:44 ` Christoph Hellwig
2021-03-17 22:10 ` [PATCH 6/8] block: add example ioctl Jens Axboe
2021-03-18 5:45 ` Christoph Hellwig
2021-03-18 12:43 ` Pavel Begunkov
2021-03-18 18:44 ` Jens Axboe
2021-03-17 22:10 ` [PATCH 7/8] net: wire up support for file_operations->uring_cmd() Jens Axboe
2022-02-17 1:03 ` Luis Chamberlain
2021-03-17 22:10 ` [PATCH 8/8] net: add example SOCKET_URING_OP_SIOCINQ/SOCKET_URING_OP_SIOCOUTQ Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox