linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Sagi Grimberg <sagi@grimberg.me>,
	"Meneghini, John" <John.Meneghini@netapp.com>,
	Keith Busch <kbusch@kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH] nvme: Translate more status codes to blk_status_t
Date: Mon, 16 Dec 2019 09:02:28 +0100	[thread overview]
Message-ID: <1db1bb81-f2e6-4ec2-ea43-b5e609be1a4e@suse.de> (raw)
In-Reply-To: <18f741dd-2445-141e-ea2b-4185476da8d2@grimberg.me>

On 12/13/19 10:02 PM, Sagi Grimberg wrote:
> 
>>      Let me test this out and I’ll see what happens.
>> Keith, I've tested this out, using CRD with both 
>> NVME_SC_CMD_INTERRUPTED and NVME_SC_NS_NOT_READY.
>>
>> It works well enough, but I think the problem goes a little deeper 
>> than this.
>>
>>> These are not generic IO errors and should use a non-path
>>>   specific error so that it can use the non-failover retry path.
>>
>> Yes, agreed.  But we have this problem with every/any other NVMe 
>> status that gets returned as well.
>> It doesn't make sense to just keep overloading the half a dozen errors 
>> you have in blk_path_error();
>>
>> I think the real problem is here:
>>
>>   276         if (unlikely(status != BLK_STS_OK && 
>> nvme_req_needs_retry(req))) {
>>   277                 if ((req->cmd_flags & REQ_NVME_MPATH) &&
>>   278                     blk_path_error(status)) {
>>   279                         nvme_failover_req(req);
>>   280                         return;
>>   281                 }
>> "nvme/drivers/nvme/host/core.c" line 281 of 4267 --6%-- col 3-17
>>
>> If we are really not allowed to change the blk_path_error() routine 
>> because it's a part of
>> the block layer, then why do we have it stuck in the middle of our 
>> multipathing policy
>> logic?
>>
>> Maybe we should create an nvme_path_error() function to replace the 
>> blk_path_error()
>> function here.
>>
>> The other problem is: setting REQ_NVME_MPATH completely changes the error
>> error handling logic.  If my controller has a single path it happily 
>> returns all kinds
>> of NVMe errors not handled by the nvme_error_status() white list.  Those
>> errors all fall through your retry logic and end up returning  
>> BLK_STS_IOERR.
>>
>> However, as soon as we add another path to that same controller, and 
>> turn on
>> REQ_NVME_MPATH, all of a sudden the controller gets a reset for returning
>> the very same errors that it retuned before.
> 
> I agree we should lose this controller reset and only do this for
> specific error cases where its needed (not thinking of any from the
> top of my head).
> 
>> And that happens before even a single retry is attempted - unless it's 
>> an NVMe pathing error.
>>
>> 105         default:
>> 106                 /*
>> 107                  * Reset the controller for any non-ANA error as 
>> we don't know
>> 108                  * what caused the error.
>> 109                  */
>> 110                 nvme_reset_ctrl(ns->ctrl);
>> 111                 break;
>> 112         }
>> "nvme/drivers/nvme/host/multipath.c" line 112 of 739 --15%-- col 1-8
>>
>> This makes no sense.
> 
> So lets remove this reset. Have the transport take care of this, or do
> it only when it is clearly needed.

Yes, this would be the best option.
I never liked the reset here in the first place; I/O errors, okay, but 
reset does imply that something unrecoverable happened.
Which clearly it didn't as the controller did provide us with a reply, 
and it's just us being too daft to understand it.

So I do agree with Sagi here; we should restrict controller reset to 
real communication failures, not failed error handling.
We did that in SCSI, and it turned out to be a mess.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke            Teamlead Storage & Networking
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:[~2019-12-16  8:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 19:57 Keith Busch
2019-12-12  9:20 ` Christoph Hellwig
2019-12-12 19:41 ` Meneghini, John
2019-12-13  7:32   ` Meneghini, John
2019-12-13 21:02     ` Sagi Grimberg
2019-12-16  8:02       ` Hannes Reinecke [this message]
2019-12-16 15:30         ` Keith Busch

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=1db1bb81-f2e6-4ec2-ea43-b5e609be1a4e@suse.de \
    --to=hare@suse.de \
    --cc=John.Meneghini@netapp.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --subject='Re: [PATCH] nvme: Translate more status codes to blk_status_t' \
    /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

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).