Linux gains async device shutdown to slash reboot times
Opt-in parallel teardown can cut multi-minute waits to under a minute on systems with slow NVMe drives.
The Linux kernel is poised to shut down devices asynchronously and in parallel, a change that can turn multi-minute reboots into tens of seconds on machines with several slow storage devices.
David Jeffery of Red Hat posted the twentieth revision of a driver-core series that lets individual devices opt into asynchronous shutdown. Unrelated async-capable devices can then tear down side by side instead of waiting in a single serial loop. The default remains synchronous; only devices that explicitly enable the feature participate. A kernel parameter, core.async_shutdown, can force the behavior on or off system-wide.
On one tested system the change cut shutdown from eleven minutes to fifty-five seconds. Another dropped from eighty seconds to eleven. The gains come largely from NVMe drives and similar hardware whose firmware teardown is slow when performed one device after another.
PCI and SCSI are among the first subsystems to mark their devices for async shutdown, following the pattern already used for async suspend. The series also links each PCI virtual function as a consumer of its physical function so shutdown order stays correct when teardown is no longer strictly serial, refuses new device registration once the system has entered halt, power-off, or restart, and relaxes parent locking so children that share a parent can shut down concurrently.
The work builds on earlier contributions from Stuart Hayes and Tarun Sahu of Google and has been tested on Red Hat hardware. Because the feature is opt-in per device and can be disabled globally, risk to existing platforms stays limited while operators of dense storage servers stand to reclaim substantial time on every reboot.