All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] nvme: Ensure forward progress during Admin passthru
@ 2018-06-22 19:59 Scott Bauer
  2018-06-22 19:59 ` [PATCH 1/1] " Scott Bauer
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Scott Bauer @ 2018-06-22 19:59 UTC (permalink / raw)


This small patch is an attempt to fix a rare boundary condition.
The only downside of the patch is scan work cannot happen concurrently,
but I don't think that's possible outside of someone issuing a sysctl.

If the controller goes down during the admin command, the command will
timeout, if the controller is in a poor enough state the reset commands
will time out. After the original admin command timeout, we unblock userland
which can start to revalidate the namespaces. In order todo that we
aquire the controller namespace sempahore as WRITE. We then issue an admin
command which times out, triggers a reset where we attempt to stop queues
in dev_disable(). Stopping queues attempts to down_read on the semaphore,
which is currently being held on a down write, waiting for this I/O to timeout.
This I/O cannot timeout until the semaphore is dropped from down_write, and
now we're deadlocked.

The patch does what nvme_remove_namespaces does, it takes over the controllers
namespace list under the down_write. Then modifies the private list, potentially
removing namespaces, and resplicing it once revalidation has occured. The whole
goal is to *not* hold a down write while issuing admin commands.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-07-18 11:26 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22 19:59 [PATCH 0/1] nvme: Ensure forward progress during Admin passthru Scott Bauer
2018-06-22 19:59 ` [PATCH 1/1] " Scott Bauer
2018-06-27 19:12   ` Keith Busch
2018-06-27 19:01     ` Scott Bauer
2018-06-27 20:27       ` Keith Busch
2018-06-27 20:49         ` Keith Busch
2018-06-24 17:38 ` [PATCH 0/1] " Sagi Grimberg
2018-06-27 19:08   ` Keith Busch
2018-06-28 17:10 ` [PATCH v2 1/1] " Scott Bauer
2018-06-28 19:16   ` Keith Busch
2018-06-28 19:19     ` Scott Bauer
2018-06-28 19:54       ` Keith Busch
2018-06-29 19:03 ` [PATCH v3 " Scott Bauer
2018-06-29 20:23   ` Keith Busch
2018-07-16 22:09     ` Keith Busch
2018-07-17 12:42       ` Christoph Hellwig
2018-07-18 11:26         ` Sagi Grimberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.