From: kbusch@kernel.org (Keith Busch)
Subject: [PATCH 2/6] nvme-pci: Don't disable on timeout in reset state
Date: Thu, 16 May 2019 08:33:51 -0600 [thread overview]
Message-ID: <20190516143351.GE23333@localhost.localdomain> (raw)
In-Reply-To: <20190516030708.GB16342@ming.t460p>
On Wed, May 15, 2019@08:07:09PM -0700, Ming Lei wrote:
> On Wed, May 15, 2019@10:36:21AM -0600, Keith Busch wrote:
> > The driver doesn't dispatch commands that it needs to wait for in the reset
> > state anymore. If a timeout occurs in this state, the reset work is
> > already disabling the controller, so just reset the request's timer.
> >
> > Signed-off-by: Keith Busch <keith.busch at intel.com>
> > ---
> > drivers/nvme/host/pci.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> > index d4e442160048..c72755311ffa 100644
> > --- a/drivers/nvme/host/pci.c
> > +++ b/drivers/nvme/host/pci.c
> > @@ -1298,13 +1298,14 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
> > shutdown = true;
> > /* fall through */
> > case NVME_CTRL_CONNECTING:
> > - case NVME_CTRL_RESETTING:
> > dev_warn_ratelimited(dev->ctrl.device,
> > "I/O %d QID %d timeout, disable controller\n",
> > req->tag, nvmeq->qid);
> > nvme_dev_disable(dev, shutdown);
> > nvme_req(req)->flags |= NVME_REQ_CANCELLED;
> > return BLK_EH_DONE;
> > + case NVME_CTRL_RESETTING:
> > + return BLK_EH_RESET_TIMER;
> > default:
> > break;
> > }
>
> RESET follows controller shutdown(via nvme_dev_disable()), the only
> possible timeout should be on admin requests staggered between shutdown
> and changing to NVME_CTRL_CONNECTING, given admin queue isn't frozen.
>
> And the admin queue should be fully workable after it is unquiesced
> by nvme_alloc_admin_tags(), so if timeout happens after nvme_alloc_admin_tags(),
> I guess these requests should be handled as in NVME_CTRL_CONNECTING.
Yep, the only timeouts here should be requests that we've already
reclaimed, or are about to reclaim, via nvme_dev_disable called
from either another timeout work or directly in the reset_work. And
nvme_dev_disable handles its timeout, so we don't need timeout work to
unblock it. Either way, we're never blocked in the RESETTING state.
> Another related problem is about handling timeout in NVME_CTRL_CONNECTING, and
> the following failure still can be observed:
>
> [ 1078.775969] nvme nvme0: I/O 20 QID 0 timeout, disable controller
> [ 1078.791730] nvme nvme0: Identify Controller failed (-4)
> [ 1078.792538] nvme nvme0: Removing after probe failure status: -5
Right, we will fail the controller if it fails to produce a response to
any initialization commands. It's either that, or try the same thing
atateain, but I haven't seen much support for doing the latter.
next prev parent reply other threads:[~2019-05-16 14:33 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 16:36 [PATCH 1/6] nvme-pci: Fix controller freeze wait disabling Keith Busch
2019-05-15 16:36 ` [PATCH 2/6] nvme-pci: Don't disable on timeout in reset state Keith Busch
2019-05-16 3:07 ` Ming Lei
2019-05-16 14:33 ` Keith Busch [this message]
2019-05-16 6:27 ` Christoph Hellwig
2019-05-15 16:36 ` [PATCH 3/6] nvme-pci: Unblock reset_work on IO failure Keith Busch
2019-05-16 3:13 ` Ming Lei
2019-05-16 14:14 ` Keith Busch
2019-05-17 2:31 ` Ming Lei
2019-05-16 6:28 ` Christoph Hellwig
2019-05-15 16:36 ` [PATCH 4/6] nvme-pci: Sync queues on reset Keith Busch
2019-05-16 3:34 ` Ming Lei
2019-05-16 6:29 ` Christoph Hellwig
2019-05-16 14:08 ` Keith Busch
2019-05-16 13:43 ` Minwoo Im
2019-05-15 16:36 ` [PATCH 5/6] nvme: Export get and set features Keith Busch
2019-05-16 6:26 ` Christoph Hellwig
2019-05-16 13:47 ` Minwoo Im
2019-05-15 16:36 ` [PATCHv2 6/6] nvme-pci: Use host managed power state for suspend Keith Busch
2019-05-15 19:33 ` Mario.Limonciello
2019-05-15 19:34 ` Keith Busch
2019-05-15 19:43 ` Mario.Limonciello
2019-05-16 6:25 ` Christoph Hellwig
2019-05-16 14:24 ` Keith Busch
2019-05-17 9:08 ` Christoph Hellwig
2019-05-16 9:29 ` Rafael J. Wysocki
2019-05-16 14:26 ` Keith Busch
2019-05-16 18:27 ` Kai-Heng Feng
2019-05-16 18:33 ` Mario.Limonciello
2019-05-16 19:38 ` Keith Busch
2019-05-16 20:25 ` Rafael J. Wysocki
2019-05-16 20:39 ` Keith Busch
2019-05-16 20:56 ` Rafael J. Wysocki
2019-05-17 8:39 ` Rafael J. Wysocki
2019-05-17 9:05 ` Christoph Hellwig
2019-05-17 9:17 ` Rafael J. Wysocki
2019-05-17 9:35 ` Christoph Hellwig
2019-05-17 10:34 ` Rafael J. Wysocki
2019-05-22 6:47 ` Kai Heng Feng
2019-05-22 15:52 ` Christoph Hellwig
2019-05-22 16:02 ` Keith Busch
2019-05-22 16:35 ` Mario.Limonciello
2019-05-22 16:56 ` Keith Busch
2019-05-22 23:08 ` Keith Busch
2019-05-23 15:27 ` Keith Busch
2019-05-17 9:22 ` Kai-Heng Feng
2019-05-17 9:32 ` Rafael J. Wysocki
2019-05-16 20:24 ` Rafael J. Wysocki
2019-05-16 2:43 ` [PATCH 1/6] nvme-pci: Fix controller freeze wait disabling Ming Lei
2019-05-17 18:40 ` Keith Busch
2019-05-16 6:27 ` Christoph Hellwig
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=20190516143351.GE23333@localhost.localdomain \
--to=kbusch@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