Re: [PATCH] PM: sleep: Add DPM watchdog to late/early/noirq phases
From: Doug Anderson
Date: Wed Sep 02 2026 - 17:18:04 EST
Hi,
On Fri, Aug 21, 2026 at 3:37 PM Doug Anderson <dianders@xxxxxxxxxxxx> wrote:
>
> Hi,
>
> On Fri, Aug 21, 2026 at 10:06 AM Mayank Rungta <mrungta@xxxxxxxxxx> wrote:
> >
> > Extend the DPM watchdog to wrap device_suspend_late, device_suspend_noirq,
> > device_resume_early, and device_resume_noirq callbacks. If a driver hangs
> > during these transitions, the watchdog will fire and dump a stack trace
> > to help identify the offending driver.
> >
> > To prevent false-positive timeouts, the watchdog is set only after
> > waiting for subordinate (during suspend) and superior (during resume)
> > devices.
> >
> > Signed-off-by: Mayank Rungta <mrungta@xxxxxxxxxx>
> > ---
> > Testing:
> > - Tested on an ARM64 SoC (Pixel platform running a 6.18-based kernel with
> > DPM watchdog enabled; Android 6.18 kernel has latest DPM changes
> > backported).
> >
> > drivers/base/power/main.c | 25 ++++++++++++++++++++++---
> > 1 file changed, 22 insertions(+), 3 deletions(-)
>
> I reviewed this patch for Mayank before he sent it. It seems correct /
> useful to me, so I'm happy with:
>
> Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
Since I reviewed this patch, someone pointed out to me that we should
probably also add the DPM watchdog to the "prepare" / "complete"
stages too. I know those stages are used less-often, but it still
seems like the DPM watchdog would be relevant there. Unless Rafael
chimes in and says he disagrees or that he dislikes this patch in
general, maybe you could post a v2 patch that adds that?
Thanks!
-Doug