Make NVME shutdown async
Jeremy Allison
jallison at ciq.com
Tue Dec 12 10:09:35 PST 2023
This is a rebased update and resend of a patchset originally
written by Tanjore Suresh <tansuresh at google.com> to make
shutdown of nvme devices asynchronous. Minor changes
made to use an enum shutdown_type instead of an
integer flag.
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.
More information about the Linux-nvme
mailing list