All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Sagi Grimberg <sagi@grimberg.me>,
	Victor Gladkov <Victor.Gladkov@kioxia.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Cc: Keith Busch <kbusch@kernel.org>,
	James Smart <james.smart@broadcom.com>,
	"Ewan D. Milne" <emilne@redhat.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v9] nvme-fabrics: reject I/O to offline device
Date: Fri, 20 Nov 2020 14:09:05 +0100	[thread overview]
Message-ID: <07622131-6dba-3735-fa5e-528bdaef7f73@suse.de> (raw)
In-Reply-To: <21948197-ac36-f757-5c1f-f36f2d6d9242@grimberg.me>

On 11/17/20 9:39 AM, Sagi Grimberg wrote:
> 
>>>> @@ -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)?
> 
> I do agree that fast_io_fail_tmo _is_ a controller attribute and should
> remain as such.
> 
> I do see what is your point Hannes, however I also think it's
> problematic that the host may fail arbitrary I/O if the controller
> happens to enter ANA inaccessible state (or have state transition
> timeout) for a period that happens to be longer than what the user
> happen to set (without communicating any of this to the controller).
> 
> IFF we want to address this (I'm still not sure), we probably want
> to activate failfast timeout in ANA state transition (and clear it
> when we exit it). Then we can modify nvme_available_path() to take
> NVME_CTRL_FAILFAST_EXPIRED into account.
> 
> Anyways, I think that this can be an incremental patch because it
> doesn't change the behavior today with respect to ANA states (or
> transition between them) e.g. queue the outstanding I/O.
> 
Okay then.
You can add:

Reviewed-by: Hannes Reinecke <hare@suse.de>

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

  reply	other threads:[~2020-11-20 13:09 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
2020-11-17  8:39       ` Sagi Grimberg
2020-11-20 13:09         ` Hannes Reinecke [this message]
     [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=07622131-6dba-3735-fa5e-528bdaef7f73@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.