From: Hannes Reinecke <hare@suse.de>
To: Victor Gladkov <Victor.Gladkov@kioxia.com>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
"Ewan D. Milne" <emilne@redhat.com>,
James Smart <james.smart@broadcom.com>
Subject: Re: [PATCH v9] nvme-fabrics: reject I/O to offline device
Date: Mon, 16 Nov 2020 10:54:05 +0100 [thread overview]
Message-ID: <08f1048d-0726-983c-c783-2e04d24b5221@suse.de> (raw)
In-Reply-To: <a3245f7368364c5b83cdd3ed3a61d718@kioxia.com>
On 11/15/20 4:45 PM, Victor Gladkov wrote:
>> -----Original Message-----
>> From: Hannes Reinecke [mailto:hare@suse.de]
>> Sent: Thursday, 01 October, 2020 11:55
>
>>> ---
>>> drivers/nvme/host/core.c | 49
>>> ++++++++++++++++++++++++++++++++++++++++++-
>>> drivers/nvme/host/fabrics.c | 25 +++++++++++++++++++---
>>> drivers/nvme/host/fabrics.h | 5 +++++
>>> drivers/nvme/host/multipath.c | 5 ++++-
>>> drivers/nvme/host/nvme.h | 3 +++
>>> 5 files changed, 82 insertions(+), 5 deletions(-)
>>>
>> I did some more experiments with this, and found that there are some issues
>> with ANA handling.
>> If reconnect works, but the ANA state indicates that we still can't sent I/O (eg
>> by still being in transitioning), we hit the 'requeueing I/O'
>> state despite fast_io_fail_tmo being set. Not sure if that's the expected
>> outcome.
>> For that it might be better to move the FAILFAST_EXPIRED bit into the
>> namespace, as then we could selectively clear the bit in
>> nvme_failfast_work():
>>
>> @@ -151,12 +151,16 @@ EXPORT_SYMBOL_GPL(nvme_try_sched_reset);
>> static void nvme_failfast_work(struct work_struct *work) {
>> struct nvme_ctrl *ctrl = container_of(to_delayed_work(work),
>> struct nvme_ctrl, failfast_work);
>> + struct nvme_ns *ns;
>>
>> - if (ctrl->state != NVME_CTRL_CONNECTING)
>> - return;
>> -
>> -
>> - set_bit(NVME_CTRL_FAILFAST_EXPIRED, &ctrl->flags);
>> + down_read(&ctrl->namespaces_rwsem);
>> + list_for_each_entry(ns, &ctrl->namespaces, list) {
>> + if (ctrl->state != NVME_CTRL_LIVE ||
>> + (ns->ana_state != NVME_ANA_OPTIMIZED &&
>> + ns->ana_state != NVME_ANA_NONOPTIMIZED))
>> + set_bit(NVME_NS_FAILFAST_EXPIRED, &ns->flags);
>> + }
>> + up_read(&ctrl->namespaces_rwsem);
>> dev_info(ctrl->device, "failfast expired\n");
>>
>> ...and we could leave the failfast worker running even after the controller
>> transitioned to LIVE.
>> Cf the attached patch for details.
>>
>> Cheers,
>>
>> Hannes
>> --
>
> I'm not sure what makes sense to move the FAILFAST_EXPIRED bit into the namespace,
> Because the failfast mechanism characterizes the controller as a whole.
>
Oh, yes, I'm aware of that. But the problem here is with multipath; how
do we handle the situation where all controllers have the
'failfast_expired' bit set?
Should I/O be terminated (which I think it should, given that failfast
is supposed to terminate the I/O)?
Or should I/O continue to run (as it does with your original patch)?
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-11-16 9:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 15:27 [PATCH v9] nvme-fabrics: reject I/O to offline device Victor Gladkov
2020-09-29 18:19 ` Sagi Grimberg
2020-09-30 5:46 ` Hannes Reinecke
2020-09-30 6:39 ` Christoph Hellwig
2020-10-01 8:55 ` Hannes Reinecke
2020-11-15 15:45 ` Victor Gladkov
2020-11-16 9:54 ` Hannes Reinecke [this message]
2020-11-17 8:39 ` Sagi Grimberg
2020-11-20 13:09 ` Hannes Reinecke
[not found] <3e9337bfbd7f410eb632e96a44b43924@kioxia.com>
2020-09-30 13:14 ` Hannes Reinecke
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=08f1048d-0726-983c-c783-2e04d24b5221@suse.de \
--to=hare@suse.de \
--cc=Victor.Gladkov@kioxia.com \
--cc=emilne@redhat.com \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--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