Make NVME shutdown two-pass - Version 4
Chaitanya Kulkarni
chaitanyak at nvidia.com
Wed Jan 3 20:48:15 PST 2024
On 1/3/24 13:04, Jeremy Allison wrote:
> This is version 4 of a patchset originally written by
> Tanjore Suresh <tansuresh at 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 at 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 at 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.
>
>
>
Is there any plan to add a blktests for this or this needs a special setup
for testing that cannot be done with blktest ?
-ck
More information about the Linux-nvme
mailing list