From: Keith Busch <keith.busch@intel.com>
To: Parav Pandit <parav.pandit@avagotech.com>
Cc: Keith Busch <keith.busch@intel.com>,
linux-nvme@lists.infradead.org,
Matthew Wilcox <willy@linux.intel.com>,
Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NVMe: Avoid interrupt disable during queue init.
Date: Fri, 22 May 2015 15:11:44 +0000 (UTC) [thread overview]
Message-ID: <alpine.LNX.2.00.1505221453230.15930@localhost.lm.intel.com> (raw)
In-Reply-To: <CAGgvQNRi+60uNYqaeKHMRci_9zuDngi07mkUsNSdiOyZz9QG-w@mail.gmail.com>
On Fri, 22 May 2015, Parav Pandit wrote:
> On Fri, May 22, 2015 at 8:18 PM, Keith Busch <keith.busch@intel.com> wrote:
>> The rcu protection on nvme queues was removed with the blk-mq conversion
>> as we rely on that layer for h/w access.
>
> o.k. But above is at level where data I/Os are not even active. Its
> between nvme_kthread and nvme_resume() from power management
> subsystem.
> I must be missing something.
On resume, everything is already reaped from the queues, so there should
be no harm letting the kthread poll an inactive queue. The proposal to
remove the q_lock during queue init makes it possible for the thread to
see the wrong cq phase bit and mess up the completion queue's head from
reaping non-existent entries.
But beyond nvme_resume, it appears a race condition is possible on any
scenario when a device is reinitialized if it cannot create the same
number of IO queues as it had in originally. Part of the problem is there
doesn't seem to be a way to change a tagset's nr_hw_queues after it was
created. The conditions that leads to this scenario should be uncommon,
so I haven't given it much thought; I need to untangle dynamic namespaces
first. :)
next prev parent reply other threads:[~2015-05-22 15:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 0:12 [PATCH] NVMe: Avoid interrupt disable during queue init Parav Pandit
2015-05-21 18:39 ` Jens Axboe
2015-05-21 19:14 ` Parav Pandit
2015-05-21 19:34 ` Keith Busch
2015-05-22 4:15 ` Parav Pandit
2015-05-22 14:48 ` Keith Busch
2015-05-22 14:51 ` Parav Pandit
2015-05-22 15:11 ` Keith Busch [this message]
2015-05-22 16:03 ` Parav Pandit
2015-05-22 16:23 ` Keith Busch
2015-05-22 16:48 ` Parav Pandit
2015-05-22 17:07 ` Keith Busch
2015-05-22 17:33 ` Parav Pandit
2015-05-22 17:47 ` Keith Busch
2015-05-22 18:18 ` Parav Pandit
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=alpine.LNX.2.00.1505221453230.15930@localhost.lm.intel.com \
--to=keith.busch@intel.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=parav.pandit@avagotech.com \
--cc=willy@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