From: Anuj Gupta <anuj20.g@samsung.com>
To: axboe@kernel.dk, hch@lst.de, kbusch@kernel.org
Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org,
linux-block@vger.kernel.org, gost.dev@samsung.com,
linux-scsi@vger.kernel.org, Anuj Gupta <anuj20.g@samsung.com>
Subject: [PATCH for-next v12 00/12] Fixed-buffer for uring-cmd/passthru
Date: Fri, 30 Sep 2022 11:57:37 +0530 [thread overview]
Message-ID: <20220930062749.152261-1-anuj20.g@samsung.com> (raw)
In-Reply-To: CGME20220930063754epcas5p2aff33c952032713a39604388eacda910@epcas5p2.samsung.com
Hi,
uring-cmd lacks the ability to leverage the pre-registered buffers.
This series adds that support in uring-cmd, and plumbs nvme passthrough
to work with it.
Patches 3 - 5 carve out a block helper and scsi, nvme then use it to
avoid duplication of code.
Patch 6 and 7 contains a bunch of general nvme cleanups, which got added
along the iterations.
Using registered-buffers showed ~20% IOPS hike from 2.62M to 3.17M in my setup
Without fixedbufs
*****************
# taskset -c 0 t/io_uring -b512 -d128 -c32 -s32 -p1 -F1 -B0 -O0 -n1 -u1 /dev/ng0n1
submitter=0, tid=3623, file=/dev/ng0n1, node=-1
polled=1, fixedbufs=0/0, register_files=1, buffered=1, QD=128
Engine=io_uring, sq_ring=128, cq_ring=128
IOPS=2.62M, BW=1281MiB/s, IOS/call=32/31
IOPS=2.62M, BW=1277MiB/s, IOS/call=32/32
IOPS=2.62M, BW=1277MiB/s, IOS/call=32/32
IOPS=2.61M, BW=1276MiB/s, IOS/call=32/32
^CExiting on signal
Maximum IOPS=2.62M
With fixedbufs
**************
# taskset -c 0 t/io_uring -b512 -d128 -c32 -s32 -p1 -F1 -B1 -O0 -n1 -u1 /dev/ng0n1
submitter=0, tid=3627, file=/dev/ng0n1, node=-1
polled=1, fixedbufs=1/0, register_files=1, buffered=1, QD=128
Engine=io_uring, sq_ring=128, cq_ring=128
IOPS=3.17M, BW=1546MiB/s, IOS/call=32/31
IOPS=3.17M, BW=1546MiB/s, IOS/call=32/31
IOPS=3.17M, BW=1546MiB/s, IOS/call=32/32
IOPS=3.16M, BW=1544MiB/s, IOS/call=32/32
^CExiting on signal
Maximum IOPS=3.17M
Changes since v11:
Patch 2 - Add a check for flags (Jens)
Patch 3 - Moved the refactoring patches to start, before the nvme-refactoring
patches (Christoph)
Patch 3 - Initialize ret to 0, to prevent uninitialized variable warning
(kernel test robot)
Patch 4 - Added the onstack advantage part in the commit description (Christoph)
Patch 7 - Move blk_rq_free_request into nvme_map_user_request to handle error
scenarios, instead of doing it using goto in it's callers, helps in getting
rid of a uninitialized variable warning (kernel test robot)
Patch 10 - Folded it in with the next patch to avoid compiler warning for
unused static functions(Christoph)
Changes since v10:
- Patch 3: Fix overly long line (Christoph)
- Patch 4: create a helper in block-map for vectored and non-vectored-io, to be used by scsi and nvme (Christoph)
- Patch 5: Rename bio_map_get to blk_rq_map_bio_alloc and bio_map_put to blk_mq_map_bio_put (Christoph)
- Patch 6: Split it into a prep patch and avoid duplicate checks (Christoph)
- Patch 7: Put changes to pass ubuffer as a integer in a separate prep patch and simplify condition checks in nvme (Christoph)
Changes since v9:
- Patch 6: Make blk_rq_map_user_iov() to operate on bvec iterator
(Christoph)
- Patch 7: Change nvme to use the above
Changes since v8:
- Split some patches further; now 7 patches rather than 5 (Christoph)
- Applied a bunch of other suggested cleanups (Christoph)
Changes since v7:
- Patch 3: added many cleanups/refactoring suggested by Christoph
- Patch 4: added copying-pages fallback for bounce-buffer/dma-alignment case
(Christoph)
Changes since v6:
- Patch 1: fix warning for io_uring_cmd_import_fixed (robot)
-
Changes since v5:
- Patch 4: newly addd, to split a nvme function into two
- Patch 3: folded cleanups in bio_map_user_iov (Chaitanya, Pankaj)
- Rebase to latest for-next
Changes since v4:
- Patch 1, 2: folded all review comments of Jens
Changes since v3:
- uring_cmd_flags, change from u16 to u32 (Jens)
- patch 3, add another helper to reduce code-duplication (Jens)
Changes since v2:
- Kill the new opcode, add a flag instead (Pavel)
- Fix standalone build issue with patch 1 (Pavel)
Changes since v1:
- Fix a naming issue for an exported helper
Anuj Gupta (6):
io_uring: add io_uring_cmd_import_fixed
io_uring: introduce fixed buffer support for io_uring_cmd
block: add blk_rq_map_user_io
scsi: Use blk_rq_map_user_io helper
nvme: Use blk_rq_map_user_io helper
block: rename bio_map_put to blk_mq_map_bio_put
Kanchan Joshi (6):
nvme: refactor nvme_add_user_metadata
nvme: refactor nvme_alloc_request
block: factor out blk_rq_map_bio_alloc helper
block: extend functionality to map bvec iterator
nvme: pass ubuffer as an integer
nvme: wire up fixed buffer support for nvme passthrough
block/blk-map.c | 150 ++++++++++++++++++++++++++++++----
drivers/nvme/host/ioctl.c | 144 ++++++++++++++++++--------------
drivers/scsi/scsi_ioctl.c | 22 +----
drivers/scsi/sg.c | 22 +----
include/linux/blk-mq.h | 2 +
include/linux/io_uring.h | 10 ++-
include/uapi/linux/io_uring.h | 9 ++
io_uring/uring_cmd.c | 28 ++++++-
8 files changed, 266 insertions(+), 121 deletions(-)
--
2.25.1
next parent reply other threads:[~2022-09-30 6:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220930063754epcas5p2aff33c952032713a39604388eacda910@epcas5p2.samsung.com>
2022-09-30 6:27 ` Anuj Gupta [this message]
2022-09-30 6:27 ` [PATCH for-next v12 01/12] io_uring: add io_uring_cmd_import_fixed Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 02/12] io_uring: introduce fixed buffer support for io_uring_cmd Anuj Gupta
2022-09-30 13:42 ` Jens Axboe
2022-09-30 14:04 ` Anuj gupta
2022-09-30 6:27 ` [PATCH for-next v12 03/12] block: add blk_rq_map_user_io Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 04/12] scsi: Use blk_rq_map_user_io helper Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 05/12] nvme: " Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 06/12] nvme: refactor nvme_add_user_metadata Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 07/12] nvme: refactor nvme_alloc_request Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 08/12] block: rename bio_map_put to blk_mq_map_bio_put Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 09/12] block: factor out blk_rq_map_bio_alloc helper Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 10/12] block: extend functionality to map bvec iterator Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 11/12] nvme: pass ubuffer as an integer Anuj Gupta
2022-09-30 6:27 ` [PATCH for-next v12 12/12] nvme: wire up fixed buffer support for nvme passthrough Anuj Gupta
2022-09-30 14:04 ` [PATCH for-next v12 00/12] Fixed-buffer for uring-cmd/passthru 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 \
--in-reply-to=20220930062749.152261-1-anuj20.g@samsung.com \
--to=anuj20.g@samsung.com \
--cc=axboe@kernel.dk \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=io-uring@vger.kernel.org \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
/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