From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Greg KH <gregkh@linuxfoundation.org>,
Soumya Khasnis <soumya.khasnis@sony.com>
Cc: rafael@kernel.org, linux-kernel@vger.kernel.org,
festevam@denx.de, lee@kernel.org, benjamin.bara@skidata.com,
dmitry.osipenko@collabora.com, ldmldm05@gmail.com,
srinavasa.nagaraju@sony.com, Madhusudan.Bobbili@sony.com,
shingo.takeuchi@sony.com, keita.aihara@sony.com,
masaya.takahashi@sony.com
Subject: Re: [PATCH v5] driver core: Add timeout for device shutdown
Date: Thu, 13 Jun 2024 13:51:57 +0200 [thread overview]
Message-ID: <ecf55d97-363d-4731-bcfa-81cb4e58f2c7@linaro.org> (raw)
In-Reply-To: <2024061326-moonlit-protozoan-61f8@gregkh>
On 13/06/2024 10:43, Greg KH wrote:
> On Thu, Jun 13, 2024 at 08:32:26AM +0000, Soumya Khasnis wrote:
>> The device shutdown callbacks invoked during shutdown/reboot
>> are prone to errors depending on the device state or mishandling
>> by one or more driver. In order to prevent a device hang in such
>> scenarios, we bail out after a timeout while dumping a meaningful
>> call trace of the shutdown callback to kernel logs, which blocks
>> the shutdown or reboot process.
>
> Again, this is not a "device shutdown" timeout, it is a "the whole
> system has not shutdown this fast" timeout.
>
> And in looking at my system, it doesn't shutdown in 10 seconds as it is
> madly flushing a ton of stuff out to the disks, and they are slow
> beasts. So your 10 second default would cause me data loss on my
> workstation, not good!
Thanks for pointing this out. It is exactly what I was worried about ...
[ ... ]
> Isn't this just a bug in your drivers? Why not fix them? Or if you
> really have to have 10 seconds to shut down, use a watchdog timer that
> you trigger from userspace and stop petting once you want to shut down.
> Then, if it expires it will reset the machine, all of your policy
> decisions would have been done in userspace, no need to get the kernel
> involved at all.
+1
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2024-06-13 11:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 8:32 [PATCH v5] driver core: Add timeout for device shutdown Soumya Khasnis
2024-06-13 8:43 ` Greg KH
2024-06-13 11:51 ` Daniel Lezcano [this message]
2024-06-19 10:00 ` Khasnis Soumya
2024-06-19 10:48 ` Greg KH
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=ecf55d97-363d-4731-bcfa-81cb4e58f2c7@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=Madhusudan.Bobbili@sony.com \
--cc=benjamin.bara@skidata.com \
--cc=dmitry.osipenko@collabora.com \
--cc=festevam@denx.de \
--cc=gregkh@linuxfoundation.org \
--cc=keita.aihara@sony.com \
--cc=ldmldm05@gmail.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masaya.takahashi@sony.com \
--cc=rafael@kernel.org \
--cc=shingo.takeuchi@sony.com \
--cc=soumya.khasnis@sony.com \
--cc=srinavasa.nagaraju@sony.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