Make NVME shutdown async - version 2
Jeremy Allison
jallison at ciq.com
Thu Dec 14 16:03:55 PST 2023
This is version 2 of 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.
Changes from version 1:
As requested by Sagi Grimberg <sagi at grimberg.me>, ensure
that shutdown_pre is only called if shutdown_post is
also defined.
-------------------------------------------------------------
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