[PATCH 2/5] PCI: Support two-pass shutdown
Jeremy Allison
jra at samba.org
Thu Jan 4 11:34:58 PST 2024
On Thu, Jan 04, 2024 at 12:55:24PM -0600, Bjorn Helgaas wrote:
>On Wed, Jan 03, 2024 at 01:04:02PM -0800, Jeremy Allison wrote:
>> From: Tanjore Suresh <tansuresh at google.com>
>>
>> Enhances the base PCI driver to add support for two-pass
>> shutdown. Adds shutdown_wait() method.
>>
>> Assume a device takes n secs to shutdown. If a machine has been
>> populated with M such devices, the total time spent in shutting down
>> all the devices will be M * n secs if the shutdown is done
>> synchronously. For example, if NVMe PCI Controllers take 5 secs
>> to shutdown and if there are 16 such NVMe controllers in a system,
>> system will spend a total of 80 secs to shutdown all
>> NVMe devices in that system.
>>
>> In order to speed up the shutdown time, a two-pass interface to
>> shutdown has been implemented. The caller calls the shutdown method
>> for each device in turn to allow a shutdown request to be sent,
>> then the caller walks the list of devices and calls shutdown_wait()
>> to synchronously wait for the shutdown to complete.
>>
>> In the NVMe case above, all 16 devices will process the shutdown
>> in parallel taking the total time to shutdown down to the time
>> for one NVMe PCI Controller to shut down.
>>
>> This will significantly reduce the machine reboot time.
>>
>> Signed-off-by: Tanjore Suresh <tansuresh at google.com>
>> Signed-off-by: Jeremy Allison <jallison at ciq.com>
>
>Rewrap commit log to fill 75 columns. Use present tense imperative,
>e.g., "Enhance ..." and "Add ..."
>
>Acked-by: Bjorn Helgaas <bhelgaas at google.com>
Done for next rev. Thanks !
More information about the Linux-nvme
mailing list