From: Kanchan Joshi <[email protected]>
To: [email protected], [email protected], [email protected]
Cc: [email protected], [email protected],
[email protected], [email protected], [email protected],
Kanchan Joshi <[email protected]>
Subject: [RFC PATCH 0/6] Fixed-buffers io_uring passthrough over nvme-char
Date: Thu, 5 Aug 2021 18:25:33 +0530 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: CGME20210805125910epcas5p1100e7093dd2b1ac5bbb751331e2ded23@epcas5p1.samsung.com
Hi,
This series takes a dig at expanding io_uring passthrough to have
fixed-buffer support.
For the NVMe side plumbing, it uses the per-namespace char-device as
the backend.
The work is on top of Jens' branch (which is 5.14-rc1 based):
https://git.kernel.dk/cgit/linux-block/log/?h=io_uring-fops.v5
Testing is done by integrating user-space side with fio:
https://github.com/joshkan/fio/commit/a8f40d4f7013ccd38fc51275d8b00fb4ce2404f5
Patches can be grouped into two parts -
First part (patch 1 and 2) involves extending 'io_uring cmd' infra
(for ioctl updates in task-context), and wire up nvme-passthrough on
char-device (/dev/ngXnY).
The second part (patch 4, 5, 6) introduces fixed-buffer variant of
uring-cmd (IORING_OP_URING_CMD_FIXED), and new NVMe passthrough IOCTLs
that operate on pre-registered buffers.
The buffers are registered with io_uring in the usual fashion. And the
buffer index is passed in command-SQE.
This to be used along with two new fixed-buffer ioctl opcodes:
NVME_IOCTL_IO_CMD_FIXED or NVME_IOCTL_IO64_CMD_FIXED.
For existing passthrough ioctl, nvme-driver maps the buffers in I/O
path for each command.
For the new ioctl, driver supplies buffer-index to io_uring and gets
to reuse pre-mapped buffers.
If introducing new ioctls in nvme (for fixed-buffer) does not sound
great, another option would be to use 'user flags' in the passthrough
command.
I look forward to the thoughts of the community on this.
Jens,
Command-SQE didn't have the field for buf_index. I'm torn among few
options, but repurposed len for now. Please take a look.
I'd appreciate the feedback/comments.
Thanks,
Changes from v4:
https://lore.kernel.org/linux-nvme/[email protected]/
1. Moved to v5 branch of Jens, adapted to task-work changes in io_uring
2. Removed support for block-passthrough (over nvme0n1) for now
3. Added support for char-passthrough (over ng0n1)
4. Added fixed-buffer passthrough in io_uring and nvme plumbing
Anuj Gupta (2):
io_uring: mark iopoll not supported for uring-cmd
io_uring: add support for uring_cmd with fixed-buffer
Kanchan Joshi (4):
io_uring: add infra for uring_cmd completion in submitter-task.
nvme: wire-up support for async-passthru on char-device.
io_uring: add helper for fixed-buffer uring-cmd
nvme: enable passthrough with fixed-buffer
drivers/nvme/host/core.c | 1 +
drivers/nvme/host/ioctl.c | 245 +++++++++++++++++++++++++++++---
drivers/nvme/host/multipath.c | 1 +
drivers/nvme/host/nvme.h | 5 +
fs/io_uring.c | 69 ++++++++-
include/linux/io_uring.h | 15 ++
include/uapi/linux/io_uring.h | 6 +-
include/uapi/linux/nvme_ioctl.h | 2 +
8 files changed, 319 insertions(+), 25 deletions(-)
--
2.25.1
next parent reply other threads:[~2021-08-05 13:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210805125910epcas5p1100e7093dd2b1ac5bbb751331e2ded23@epcas5p1.samsung.com>
2021-08-05 12:55 ` Kanchan Joshi [this message]
[not found] ` <CGME20210805125917epcas5p4f75c9423a7b886dc79500901cc8f55ab@epcas5p4.samsung.com>
2021-08-05 12:55 ` [RFC PATCH 1/6] io_uring: add infra for uring_cmd completion in submitter-task Kanchan Joshi
[not found] ` <CGME20210805125923epcas5p10e6c1b95475440be68f58244d5a3cb9a@epcas5p1.samsung.com>
2021-08-05 12:55 ` [RFC PATCH 2/6] nvme: wire-up support for async-passthru on char-device Kanchan Joshi
2021-09-07 7:46 ` Christoph Hellwig
2021-09-07 16:20 ` Kanchan Joshi
2021-09-08 6:15 ` Christoph Hellwig
2021-09-22 7:19 ` Kanchan Joshi
[not found] ` <CGME20210805125927epcas5p28f3413fe3d0a2baed37a05453df0d482@epcas5p2.samsung.com>
2021-08-05 12:55 ` [RFC PATCH 3/6] io_uring: mark iopoll not supported for uring-cmd Kanchan Joshi
[not found] ` <CGME20210805125931epcas5p259fec172085ea34fdbf5a1c1f8da5e90@epcas5p2.samsung.com>
2021-08-05 12:55 ` [RFC PATCH 4/6] io_uring: add helper for fixed-buffer uring-cmd Kanchan Joshi
2021-09-07 7:47 ` Christoph Hellwig
[not found] ` <CGME20210805125934epcas5p4ff88e95d558ad9f65d77a888a4211b18@epcas5p4.samsung.com>
2021-08-05 12:55 ` [RFC PATCH 5/6] io_uring: add support for uring_cmd with fixed-buffer Kanchan Joshi
2021-09-07 7:48 ` Christoph Hellwig
2021-09-07 16:29 ` Kanchan Joshi
[not found] ` <CGME20210805125937epcas5p15667b460e28d87bd40400f69005aafe3@epcas5p1.samsung.com>
2021-08-05 12:55 ` [RFC PATCH 6/6] nvme: enable passthrough " Kanchan Joshi
2021-09-07 7:50 ` Christoph Hellwig
2021-09-07 16:47 ` Kanchan Joshi
2021-09-08 6:16 ` Christoph Hellwig
2021-09-07 7:10 ` [RFC PATCH 0/6] Fixed-buffers io_uring passthrough over nvme-char Christoph Hellwig
2021-09-07 12:38 ` 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] \
[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