mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: stuart hayes <stuart.w.hayes@gmail.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Tanjore Suresh <tansuresh@google.com>,
	Martin Belanger <Martin.Belanger@dell.com>,
	Oliver O'Halloran <oohall@gmail.com>,
	Daniel Wagner <dwagner@suse.de>, Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] driver core: shut down devices asynchronously
Date: Wed, 16 Aug 2023 14:42:26 -0500	[thread overview]
Message-ID: <653f62d4-277b-7cdb-39ba-03e0e7dfc1c0@gmail.com> (raw)
In-Reply-To: <20230816155435.GA18922@wunner.de>



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.

  reply	other threads:[~2023-08-16 19:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 15:45 Stuart Hayes
2023-08-16 15:54 ` Lukas Wunner
2023-08-16 19:42   ` stuart hayes [this message]
2023-08-16 19:52     ` Lukas Wunner
2023-08-16 22:07 ` kernel test robot
2023-08-17  0:10 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=653f62d4-277b-7cdb-39ba-03e0e7dfc1c0@gmail.com \
    --to=stuart.w.hayes@gmail.com \
    --cc=Martin.Belanger@dell.com \
    --cc=dwagner@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=oohall@gmail.com \
    --cc=rafael@kernel.org \
    --cc=tansuresh@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®