lkml.org 
[lkml]   [2021]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] watchdog: introduce watchdog_dev_suspend/resume
On Wed, Jun 16, 2021 at 03:59:23PM +0200, Grzegorz Jaszczyk wrote:
> On Tue, 15 Jun 2021 at 16:18, Guenter Roeck <linux@roeck-us.net> wrote:
> >
> > On Tue, Jun 15, 2021 at 02:39:03PM +0200, Grzegorz Jaszczyk wrote:
> > > The watchdog drivers often disable wdog clock during suspend and then
> > > enable it again during resume. Nevertheless the ping worker is still
> > > running and can issue low-level ping while the wdog clock is disabled
> > > causing the system hang. To prevent such condition introduce
> > > watchdog_dev_suspend/resume which can be used by any wdog driver and
> > > actually cancel ping worker during suspend and restore it back, if
> > > needed, during resume.
> > >
> >
> > I'll have to look into this further, but I don't think this is the correct
> > solution. Most likely the watchdog core needs to have its own independent
> > suspend/resule functions and suspend the high resolution timer on
> > suspend and restore it on resume. This may require an additional flag
> > to be set by drivers to indicate that the timer should be stopped on
> > suspend.
>
> That makes sense - thank you for your suggestion. I think I could
> register a pm notifier in the watchdog core when the new e.g.
> WDOG_STOP_PING_ON_SUSPEND status flag will be set by the driver and
> actually call watchdog_dev_suspend/resume from the notifier callback.
> Please let me know if you see any other issue with this solution, if
> not I will post v2.
>
Go for it.

Thanks,
Guenter

\
 
 \ /
  Last update: 2021-06-16 19:58    [W:0.050 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site