public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* Make NVME shutdown two-pass - Version 5
@ 2024-01-29 18:19 Jeremy Allison
  2024-01-29 18:19 ` [PATCH 1/5] driver core: Support two-pass driver shutdown Jeremy Allison
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Jeremy Allison @ 2024-01-29 18:19 UTC (permalink / raw)
  To: jallison, jra, tansuresh, hch, gregkh, rafael, bhelgaas, sagi; +Cc: linux-nvme

This is version 5 of a patchset originally written by
Tanjore Suresh <tansuresh@google.com> to make shutdown
of nvme devices two-pass.

Changes from version 4:

1). Isolated 'enum shutdown_type' change into
drivers/nvme/host/pci.c only.

2). Added a new function: nvme_request_shutdown()
that requests shutdown but doesn't wait for completion,
called from within nvme_dev_disable() when shutdown_type
is NVME_PCI_DISABLE_SHUTDOWN_TWOPASS.

I didn't get feedback on my 'bool or enum' request,
so decided to go with the enum as it reduced the amount
of code changes and makes things cleaner (IMHO).

-------------------------------------------------------------
Currently the Linux nvme driver shutdown code steps
through each connected drive, sets the NVME_CC_SHN_NORMAL
(normal shutdown) flag and then polls the given drive
waiting for the response NVME_CSTS_SHST_CMPLT flag
(shutdown complete).

Each drive is taking around 13 seconds to respond to this.

The customer has 20+ drives on the box so this time adds
up on shutdown when the nvme driver is being shut down.

This patchset changes shutdown to proceed in parallel,
so the NVME_CC_SHN_NORMAL (normal shutdown) flag is
sent to all drives first, and then it polls waiting
for the NVME_CSTS_SHST_CMPLT flag (shutdown complete)
for all drives.

In the specific customer case it reduces the NVME
shutdown time from over 300 seconds to around 15
seconds.
-------------------------------------------------------------

Thanks for your consideration,

Jeremy Allison.
CIQ / Samba Team.




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

end of thread, other threads:[~2024-02-14 22:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 18:19 Make NVME shutdown two-pass - Version 5 Jeremy Allison
2024-01-29 18:19 ` [PATCH 1/5] driver core: Support two-pass driver shutdown Jeremy Allison
2024-01-30 10:00   ` Sagi Grimberg
2024-02-14  3:36   ` Saravana Kannan
2024-02-14  8:10     ` Christoph Hellwig
2024-02-14 21:36       ` Saravana Kannan
2024-02-14 22:10         ` Bjorn Helgaas
2024-01-29 18:19 ` [PATCH 2/5] PCI: Support two-pass shutdown Jeremy Allison
2024-01-30 10:00   ` Sagi Grimberg
2024-01-30 17:54   ` Bjorn Helgaas
2024-01-29 18:19 ` [PATCH 3/5] nvme: Change 'bool shutdown' into an enum shutdown_type for nvme_dev_disable() Jeremy Allison
2024-01-30 11:00   ` Sagi Grimberg
2024-01-31  6:19   ` Christoph Hellwig
2024-01-29 18:19 ` [PATCH 4/5] nvme: Add a new exported function nvme_request_shutdown() Jeremy Allison
2024-01-30 10:58   ` Sagi Grimberg
2024-01-30 17:31     ` Jeremy Allison
2024-01-31  6:20       ` Christoph Hellwig
2024-01-29 18:19 ` [PATCH 5/5] nvme: Add two-pass shutdown support Jeremy Allison
2024-01-30 11:15   ` Sagi Grimberg
2024-01-30 18:54     ` Jeremy Allison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox