Re: [PATCH v2] driver core: shut down devices asynchronously

From: stuart hayes
Date: Sat Sep 16 2023 - 16:03:28 EST




On 9/13/2023 4:05 PM, Stuart Hayes wrote:
Shut down devices asynchronously, ensuring that each device is shut down
before its parents.

This can dramatically reduce system shutdown/reboot time on systems that
have devices that take many seconds to shut down, such as some NVMe drives.
On one system tested, the shutdown time went from 11 minutes without this
patch to 55 seconds with the patch.

Signed-off-by: Stuart Hayes <stuart.w.hayes@xxxxxxxxx>
---
v1->v2: rewritten using kernel async code (suggested by Lukas Wunner)
---

drivers/base/base.h | 2 +
drivers/base/core.c | 135 ++++++++++++++++++++++++------------------
include/linux/async.h | 6 ++
3 files changed, 87 insertions(+), 56 deletions(-)


Please disregard this patch... I realized this could be done in a simpler way. I'll send a V3 this week.