From: jianchao.w.wang@oracle.com (jianchao.wang)
Subject: [PATCHv4 1/4] nvme: Sync request queues on reset
Date: Tue, 17 Jul 2018 13:37:54 +0800 [thread overview]
Message-ID: <61d982b9-069f-3c9c-bf64-24428b879876@oracle.com> (raw)
In-Reply-To: <20180716133059.GB19967@localhost.localdomain>
On 07/16/2018 09:30 PM, Keith Busch wrote:
>>> On 07/14/2018 04:56 AM, Keith Busch wrote:
>>>> This patch fixes races that occur with simultaneous controller
>>>> resets by synchronizing request queues prior to initializing the
>>>> controller. Withouth this, a thread may attempt disabling a controller
>>>> at the same time as we're trying to enable it.
>>> This issue is due to the previous blk-mq timeout mechanism will hold
>>> all the timed out requests, then nvme_dev_disable cannot grab these requests
>>> and when it returns, the blk_mq_timeout_work could be still running.
>>> But after commit 12f5b9314545 ("blk-mq: Remove generation seqeunce"),
>>> nvme_dev_disble have been able to grab all the requests and when it returns,
>>> there will be no any requests in blk_mq_timeout_work so nvme_dev_disable will
>>> not be invoked multiple times.
>>> So this patch should be unnecessary. :)
>> There are multiple namespaces, and all may trigger timeout at the same
>> time, so looks the sync is still needed.
> Yes, we still need this syncing because each namespace has a different
> request queue with their own timeout work.
>
Yes, got it. :)
If there are multiple namespaces and trigger timeout at the same time,
so the nvme_dev_disable could be invoked by multiple namespaces' timeout work.
The nvme_dev_disable comes from other namespaces could race with the ctrl reset
work.
Thanks
Jianchao
next prev parent reply other threads:[~2018-07-17 5:37 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 [this message]
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
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=61d982b9-069f-3c9c-bf64-24428b879876@oracle.com \
--to=jianchao.w.wang@oracle.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).