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

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

Changes from version 3:

1). Removed duplicate setting of ctrl->ctrl_config in
nvme completion function. Noticed by Sagi Grimberg <sagi@grimberg.me>

2). Removed intermediate function nvme_wait_for_shutdown_cmpl(),
folded this code directly into nvme_shutdown_wait() by
exporting nvme_wait_ready() from drivers/nvme/host/core.c.
Requested by Sagi Grimberg <sagi@grimberg.me>

-------------------------------------------------------------
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-01-08 18:41 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 21:04 Make NVME shutdown two-pass - Version 4 Jeremy Allison
2024-01-03 21:04 ` [PATCH 1/5] driver core: Support two-pass driver shutdown Jeremy Allison
2024-01-04 13:12   ` Sagi Grimberg
2024-01-04 17:27     ` Jeremy Allison
2024-01-03 21:04 ` [PATCH 2/5] PCI: Support two-pass shutdown Jeremy Allison
2024-01-04 18:55   ` Bjorn Helgaas
2024-01-04 19:34     ` Jeremy Allison
2024-01-03 21:04 ` [PATCH 3/5] nvme: Change 'bool shutdown' into an enum shutdown_type Jeremy Allison
2024-01-04 13:26   ` Sagi Grimberg
2024-01-04 17:43     ` Jeremy Allison
2024-01-04 18:44       ` Jeremy Allison
2024-01-08 17:42         ` Sagi Grimberg
2024-01-08 18:41           ` Jeremy Allison
2024-01-03 21:04 ` [PATCH 4/5] nvme: Export nvme_wait_ready() Jeremy Allison
2024-01-03 21:04 ` [PATCH 5/5] nvme: Add two-pass shutdown support Jeremy Allison
2024-01-04 13:14   ` Sagi Grimberg
2024-01-04 17:30     ` Jeremy Allison
2024-01-04  4:48 ` Make NVME shutdown two-pass - Version 4 Chaitanya Kulkarni
2024-01-04  6:38   ` Jeremy Allison
2024-01-04 19:00 ` Keith Busch

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