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

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

Changes from version 2:

1). As requested by Christoph Hellwig, don't add shutdown_pre()
shutdown_post() methods, only add a shutdown_wait() method
to prevent clutter in the interfaces. Two pass shutdown
is only done if both shutdown() and shutdown_wait() methods
are defined.

2). As requested by Christoph Hellwig, split out the addition
of the 'enum shutdown_type' into a separate patch to make the
subsequent changes clearer.

3). Use 'two-pass' instead of async in the interface
documentation. This isn't truly async as there's no
notification on completion.

-------------------------------------------------------------
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] 22+ messages in thread

end of thread, other threads:[~2024-01-08  8:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-21 17:22 Make NVME shutdown two-pass - Version 3 Jeremy Allison
2023-12-21 17:22 ` [PATCH 1/4] driver core: Support two-pass driver shutdown Jeremy Allison
2023-12-21 17:29   ` Greg KH
2023-12-27 20:33   ` Bjorn Helgaas
2024-01-01  9:23     ` Sagi Grimberg
2024-01-02 23:12       ` Jeremy Allison
2024-01-05  4:28         ` Christoph Hellwig
2024-01-02 18:07     ` Jeremy Allison
2024-01-05  4:29       ` Christoph Hellwig
2024-01-05 18:15         ` Bjorn Helgaas
2024-01-08  8:28           ` Christoph Hellwig
2023-12-21 17:22 ` [PATCH 2/4] PCI: Support two-pass shutdown Jeremy Allison
2023-12-21 17:22 ` [PATCH 3/4] Change 'bool shutdown' into an enum shutdown_type { NVME_DISABLE_RESET = 0, NVME_DISABLE_SHUTDOWN_SYNC = 1 } Jeremy Allison
2023-12-27 19:33   ` Bjorn Helgaas
2024-01-02 18:06     ` Jeremy Allison
2023-12-21 17:22 ` [PATCH 4/4] nvme: Add two-pass shutdown support Jeremy Allison
2023-12-25  9:58   ` Sagi Grimberg
2023-12-27  0:53     ` Jeremy Allison
2024-01-01  9:21       ` Sagi Grimberg
2024-01-02 18:03         ` Jeremy Allison
2024-01-03  8:36           ` Sagi Grimberg
2024-01-03 17:41             ` Jeremy Allison

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