[PATCH 2/5] PCI: Support two-pass shutdown

Jeremy Allison jra at samba.org
Wed Feb 7 14:02:25 PST 2024


On Wed, Feb 07, 2024 at 03:59:50PM -0600, Bjorn Helgaas wrote:
>On Wed, Feb 07, 2024 at 01:40:41PM -0800, Jeremy Allison wrote:
>> From: Tanjore Suresh <tansuresh at google.com>
>>
>> Enhance the base PCI driver to add support for two-pass shutdown. Add
>> 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>
>
>I already acked this, so you can include that ack in subsequent
>revisions unless you make significant changes:
>https://lore.kernel.org/r/20240130175430.GA527253@bhelgaas
>
>Thanks for rewrapping the commit log!

Thanks, I'm still learning the right conventions. I'll
add the ack's for the next version.



More information about the Linux-nvme mailing list