From: keith.busch@linux.intel.com (Keith Busch)
Subject: [PATCHv4 1/4] nvme: Sync request queues on reset
Date: Wed, 18 Jul 2018 07:52:24 -0600 [thread overview]
Message-ID: <20180718135223.GA30873@localhost.localdomain> (raw)
In-Reply-To: <0fb455af-946c-e45a-fc38-dc0044015cff@grimberg.me>
On Wed, Jul 18, 2018@02:46:55PM +0300, Sagi Grimberg wrote:
>
> > > But scheduling a reset while a reset is running should not succeed. You
> > > should not be able to change state RESETTING -> RESETTING
> >
> > Timeout handlers call nvme_dev_disable prior to the reset schedule
> > attempt, which is the part that we want to prevent occuring concurrently
> > with an already scheduled reset.
>
> So why not make the timeout handlers not call nvme_dev_disable? It looks
> like this is causing us to jump over hoops to accommodate for.
>
> I think I asked it a couple of times before, why isn't the timeout
> handler simply either:
> 1. abort, or
> 2. queue a reset (and return BLK_EH_RESET_TIMER), or
> 3. fail early the I/O if it is coming from the reset context (and
> return BLK_EH_DONE)
>
> *If* there is a rare race where the timed out I/O from (3) is completing
> with the timeout handler concurrently, we can simply suspend that queue
> alone.
You're just moving the hoop you have to jump through. Handling it inline
with the timeout handler reclaims lost commands in starting, deleting,
and live contexts. The existing reset_work can only reclaim from live.
If you want to create an intermediary work just to do the reset, you'll
first need to untangle the state machine to allow that to happen in a
deleting state, and that work needs to sync with these request queues
anyway, and then everyone else needs to sync with that new work we
created just to do something that is already handled in a work context
that we already sync with.
next prev parent reply other threads:[~2018-07-18 13:52 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 20:56 [PATCHv4 0/4] nvme timeout updates Keith Busch
2018-07-13 20:56 ` [PATCHv4 1/4] nvme: Sync request queues on reset Keith Busch
2018-07-16 8:52 ` jianchao.wang
2018-07-16 10:39 ` Ming Lei
2018-07-16 13:30 ` Keith Busch
2018-07-17 5:37 ` jianchao.wang
2018-07-16 14:51 ` Sagi Grimberg
2018-07-16 15:37 ` Keith Busch
2018-07-16 16:36 ` Sagi Grimberg
2018-07-16 17:12 ` Keith Busch
2018-07-17 13:40 ` Christoph Hellwig
2018-07-17 14:54 ` Keith Busch
2018-07-18 11:46 ` Sagi Grimberg
2018-07-18 13:52 ` Keith Busch [this message]
2018-07-13 20:56 ` [PATCHv4 2/4] nvme: Start controller in own work queue Keith Busch
2018-07-16 15:00 ` Sagi Grimberg
2018-07-16 15:35 ` Keith Busch
2018-07-13 20:56 ` [PATCHv4 3/4] nvme: Introduce frozen controller state Keith Busch
2018-07-16 9:02 ` jianchao.wang
2018-07-16 11:09 ` Ming Lei
2018-07-16 13:36 ` Keith Busch
2018-07-17 1:23 ` Ming Lei
2018-07-17 5:49 ` jianchao.wang
2018-07-17 7:21 ` Ming Lei
2018-07-17 7:28 ` jianchao.wang
2018-07-17 14:32 ` Keith Busch
2018-07-18 2:57 ` jianchao.wang
2018-07-17 14:06 ` Keith Busch
2018-07-16 16:34 ` Sagi Grimberg
2018-07-17 16:05 ` James Smart
2018-07-17 16:17 ` Keith Busch
2018-07-18 12:20 ` Sagi Grimberg
2018-07-18 13:53 ` Keith Busch
2018-07-13 20:56 ` [PATCHv4 4/4] nvme-pci: Use controller start work to dispath IO Keith Busch
2018-07-19 19:48 ` [PATCHv4 0/4] nvme timeout updates Scott Bauer
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=20180718135223.GA30873@localhost.localdomain \
--to=keith.busch@linux.intel.com \
/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).