[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <653f62d4-277b-7cdb-39ba-03e0e7dfc1c0@gmail.com>
Date: Wed, 16 Aug 2023 14:42:26 -0500
From: stuart hayes <stuart.w.hayes@...il.com>
To: Lukas Wunner <lukas@...ner.de>
Cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Tanjore Suresh <tansuresh@...gle.com>,
Martin Belanger <Martin.Belanger@...l.com>,
Oliver O'Halloran <oohall@...il.com>,
Daniel Wagner <dwagner@...e.de>,
Keith Busch <kbusch@...nel.org>
Subject: Re: [PATCH] driver core: shut down devices asynchronously
On 8/16/2023 10:54 AM, Lukas Wunner wrote:
> On Wed, Aug 16, 2023 at 10:45:18AM -0500, Stuart Hayes wrote:
>> Attempt to shut down devices asynchronously, by making a tree of devices with
>> associated work and completion structs, to ensure that child devices are shut
>> down before 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 once
>> system tested, the shutdown time went from 11 minutes before the patch to 55
>> seconds with the patch.
>>
>> The code could be simplified by adding the work and completion structs to
>> struct device, but it may make more sense to not burden it with that when there
>> is likely enough memory to allocate this at shutdown time, and if there isn???t,
>> it just falls back to the current synchronous shutdown.
>
> Please wrap the commit message at 72 chars.
>
Thanks
> Is there a particular reason why you're not using the infrastructure
> provided by kernel/async.c and <async.h>, such as async_schedule()?
> It wraps all the work_struct plumbing and also has helpers to await
> completion. I imagine using that might reduce LoC in this patch.
>
Not a good one. Let me look into this, thank you.
Powered by blists - more mailing lists