Linux Power Management development
 help / color / mirror / Atom feed
From: "Brandt, Todd E" <todd.e.brandt@intel.com>
To: "rafael@kernel.org" <rafael@kernel.org>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>
Subject: Re: [PATCH v2] PM: dpm_show_time changes to suspend/resume dmesg prints
Date: Mon, 21 Sep 2026 19:08:11 +0000	[thread overview]
Message-ID: <0986b7fb287eb688b9e34a4648970c43b561e99b.camel@intel.com> (raw)
In-Reply-To: <CAJZ5v0gPuf4wpqMgMUVEAvETcyKVNvSXK6=Fe0DYfHbp-J1zLQ@mail.gmail.com>

On Fri, 2026-09-04 at 15:18 +0200, Rafael J. Wysocki (Intel) wrote:
> On Tue, Sep 1, 2026 at 12:29 AM Todd Brandt
> <todd.e.brandt@linux.intel.com> wrote:
> > 
> > Organize the optional dpm_show_time prints to focus on the 8
> > possible
> > suspend/resume callbacks devices can use and their associated
> > phases
> > when they're called in suspend:
> > 
> > Remove "start suspend" as it is currently a combination of
> > "suspend" and
> > "suspend prepare". Replace it with "prepare suspend" as a separate
> > print.
> > Add "complete resume" over the dpm_complete call. For example:
> > 
> > [   66.680479] PM: suspend entry (s2idle)
> > [   66.826646] PM: prepare suspend of devices complete after
> > 114.081 msecs
> > [   67.119306] PM: suspend of devices complete after 292.639 msecs
> > [   67.121309] PM: late suspend of devices complete after 1.983
> > msecs
> > [   67.190184] PM: noirq suspend of devices complete after 68.309
> > msecs
> > [   81.227706] PM: noirq resume of devices complete after 49.196
> > msecs
> > [   81.230847] PM: early resume of devices complete after 2.922
> > msecs
> > [   82.444735] PM: resume of devices complete after 1213.869 msecs
> > [   82.447943] PM: complete resume of devices complete after 2.850
> > msecs
> > [   82.457131] PM: suspend exit
> > 
> > v2 change: replace error variable with NULL in dpm_complete
> > 
> > Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
> > ---
> >  drivers/base/power/main.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> > index e130da428141..7496f76bf9f8 100644
> > --- a/drivers/base/power/main.c
> > +++ b/drivers/base/power/main.c
> > @@ -1329,6 +1329,7 @@ static void device_complete(struct device
> > *dev, pm_message_t state)
> >  void dpm_complete(pm_message_t state)
> >  {
> >         struct list_head list;
> > +       ktime_t starttime = ktime_get();
> > 
> >         trace_suspend_resume(TPS("dpm_complete"), state.event,
> > true);
> > 
> > @@ -1358,6 +1359,7 @@ void dpm_complete(pm_message_t state)
> >         thermal_pm_complete();
> >         /* Allow device probing and trigger re-probing of deferred
> > devices */
> >         device_unblock_probing();
> > +       dpm_show_time(starttime, state, NULL, "complete");
> 
> Integer 0 should be passed to the above, not NULL.
> 
Understood. I'll push a v3 once I've done more testing. I want to be
sure that the prepare and complete phases accurately show the whole of
dpm_prepare and dpm_complete so I may make a few more changes.

> >         trace_suspend_resume(TPS("dpm_complete"), state.event,
> > false);
> >  }
> > 
> > @@ -2352,6 +2354,7 @@ int dpm_suspend_start(pm_message_t state)
> >         int error;
> > 
> >         error = dpm_prepare(state);
> > +       dpm_show_time(starttime, state, error, "prepare");
> >         if (error)
> >                 dpm_save_failed_step(SUSPEND_PREPARE);
> >         else {
> > @@ -2359,7 +2362,6 @@ int dpm_suspend_start(pm_message_t state)
> >                 error = dpm_suspend(state);
> >         }
> > 
> > -       dpm_show_time(starttime, state, error, "start");
> >         return error;
> >  }
> >  EXPORT_SYMBOL_GPL(dpm_suspend_start);
> > --
> > 2.34.1
> > 
> > 


      reply	other threads:[~2026-09-21 19:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 22:29 [PATCH v2] PM: dpm_show_time changes to suspend/resume dmesg prints Todd Brandt
2026-09-03  4:15 ` kernel test robot
2026-09-04 13:18 ` Rafael J. Wysocki (Intel)
2026-09-21 19:08   ` Brandt, Todd E [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=0986b7fb287eb688b9e34a4648970c43b561e99b.camel@intel.com \
    --to=todd.e.brandt@intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /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