From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-nvme@lists.infradead.org
Cc: kbusch@kernel.org, hch@lst.de,
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
sagi@grimberg.me
Subject: [PATCH V4 0/7] nvme-core: timeout related fixes and cleanup
Date: Tue, 6 Oct 2020 16:30:42 -0700 [thread overview]
Message-ID: <20201006233049.55458-1-chaitanya.kulkarni@wdc.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 3634 bytes --]
Hi,
This patch series uses NVME_IO_TIMEOUT for the sync request submission
and user request submission when the timeout is not specified by the
caller and request queue data is set to NULL which is true for admin
queue.
Also in this version, I've added timeout values setting for the NVMeOF
passthru controller given that passthru VUCs (both admin and I/O VUCs)
can differ in execution time than general-purpose admin and I/O command
set following is the detailed scenario :-
Consider NVMeOF target is setup in the passthru mode and both target and
host modules are loaded with the default timeout values present
in the nvme-core.
1. User issues nvme cmd from the host to the target of nvme-cli where
timeout is taken from the controller log page e.g. :-
# nvme io-passthru --timeout=XXX ...
OR
# nvme admin-passthru --timeout=XXX ...
The timeout value in the above example is greater than the default
timeout value present in host-core for both on host machine and the
target machine.
2. The host-core on the host side will set the timeout for the host
request and issues NVMe cmd over transport.
3. In the absence of [1] target will set the timeout value which is
default timeout and that is smaller than the timeout set on the host
side.
4. Due to lack of timeout value not passed over the transport leading
to smaller timeout value for the request on the target than the host
side, target side command will timeout.
This breaks the scenario where the same command with timeout value
from nvme-cli is able to execute with success when issued to NVMe
PCIe ctrl but will fail when it is executed on the NVMeOF Passthru
ctrl.
Regards,
Chaitanya
[1] nvmet: add passthru admin timeout value attr
nvmet: add passthru io timeout value attr
* Changes from V3:-
1. Rebase and retest on nvme-5.10.
2. Update the cover-letter with detailed scenario why NVMeOF target
passthru is needed.
3. Wrap the line under 80 char for the last patch.
4. Change the nvme_default_timeout() -> nvme_set_req_default_timeout()
such that it will not take timeout argument.
* Changes from V2:-
1. Introduce nvme_defalt_timeout() helper and use it in host/core.c.
2. Use nvme_default_timeout() in the lightnvme.c
* Changes from V1:-
1. Instead of using qid to decide IO or ADMIN timeout use request
queue's queuedata whch we only set for non admin queue
__nvme_submit_sync_cmd().
2. Add second patch to set IO timeout for nvme_submit_user_cmd().
3. Set the NVMeOF passthru ctrl timeout values with default values from
nvme-core module.
4. Add admin and I/O timeout configfs attributes for NVMeOF passthru
controller.
Chaitanya Kulkarni (7):
nvme-core: use I/O timeout in submit sync cmd
nvme-core: use I/O timeout in nvme_submit_user_cmd
lightnvm: use I/O timeout in nvm submit user cmd
nvmet: set default timeout for passthru requests
nvmet: add passthru admin timeout value attr
nvmet: add passthru io timeout value attr
nvme: use consistent macro name for timeout
drivers/nvme/host/core.c | 10 ++++--
drivers/nvme/host/fc.c | 2 +-
drivers/nvme/host/lightnvm.c | 3 +-
drivers/nvme/host/nvme.h | 10 +++++-
drivers/nvme/host/pci.c | 8 ++---
drivers/nvme/host/rdma.c | 2 +-
drivers/nvme/host/tcp.c | 2 +-
drivers/nvme/target/configfs.c | 64 ++++++++++++++++++++++++++++++++++
drivers/nvme/target/loop.c | 2 +-
drivers/nvme/target/nvmet.h | 2 ++
drivers/nvme/target/passthru.c | 11 ++++++
11 files changed, 103 insertions(+), 13 deletions(-)
--
2.22.1
[-- Attachment #2: Type: text/plain, Size: 158 bytes --]
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next reply other threads:[~2020-10-06 23:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-06 23:30 Chaitanya Kulkarni [this message]
2020-10-06 23:30 ` [PATCH V4 1/7] nvme-core: use I/O timeout in submit sync cmd Chaitanya Kulkarni
2020-10-06 23:30 ` [PATCH V4 2/7] nvme-core: use I/O timeout in nvme_submit_user_cmd Chaitanya Kulkarni
2020-10-06 23:30 ` [PATCH V4 3/7] lightnvm: use I/O timeout in nvm submit user cmd Chaitanya Kulkarni
2020-10-06 23:30 ` [PATCH V4 4/7] nvmet: set default timeout for passthru requests Chaitanya Kulkarni
2020-10-06 23:30 ` [PATCH V4 5/7] nvmet: add passthru admin timeout value attr Chaitanya Kulkarni
2020-10-06 23:30 ` [PATCH V4 6/7] nvmet: add passthru io " Chaitanya Kulkarni
2020-10-06 23:30 ` [PATCH V4 7/7] nvme: use consistent macro name for timeout Chaitanya Kulkarni
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=20201006233049.55458-1-chaitanya.kulkarni@wdc.com \
--to=chaitanya.kulkarni@wdc.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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;
as well as URLs for NNTP newsgroup(s).