From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stuart hayes <stuart.w.hayes@gmail.com>
Cc: linux-kernel@vger.kernel.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>,
Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCH v4] driver core: shut down devices asynchronously
Date: Sat, 21 Oct 2023 12:58:53 +0200 [thread overview]
Message-ID: <2023102151-rejoicing-studio-6126@gregkh> (raw)
In-Reply-To: <4f36de79-6271-ab6f-19fe-ba189e748b8f@gmail.com>
On Thu, Oct 19, 2023 at 03:40:48PM -0500, stuart hayes wrote:
>
>
> On 10/5/2023 4:36 AM, Greg Kroah-Hartman wrote:
> > On Thu, Sep 21, 2023 at 11:34:43AM -0500, 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.
> >
> > That's a nice improvement, but I think we need a lot more testing on a
> > wide range of systems before we can take a patch like this.
> >
> > Also, what about busses that don't want this type of shutdown? We allow
> > busses to opt-in for async probing, shouldn't that be also done for
> > shutting them down to resolve issues for busses that can not handle
> > this?
> >
> > thanks,
> >
> > greg k-h
>
> Yes, I could add something like what is done for async probing, so drivers
> have to opt in to async shutdown of their devices.
>
> But I'm not sure how to get it tested on a wide range of systems, other than
> than having the patch in the kernel.
Yes, breaking things is the only way you will know :)
> What if it defaults to synchronous
> shutdown for now, but the option is there so people are able to test async
> shutdown by changing an attribute in sysfs? Then drivers could be patched
> later to opt in to async shutdown of their devices by default...?
Yes, that will be the proper way forward, default to what you know works
today, and then busses can opt-in for the async option if they work
properly. That's what we did with probing, so it can mirror that.
thanks,
greg k-h
prev parent reply other threads:[~2023-10-21 10:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 16:34 [PATCH v4] driver core: shut down devices asynchronously Stuart Hayes
2023-10-05 9:36 ` Greg Kroah-Hartman
2023-10-19 20:40 ` stuart hayes
2023-10-21 10:58 ` Greg Kroah-Hartman [this message]
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=2023102151-rejoicing-studio-6126@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Martin.Belanger@dell.com \
--cc=dwagner@suse.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=oohall@gmail.com \
--cc=rafael@kernel.org \
--cc=stuart.w.hayes@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.