From: Todd Brandt <todd.e.brandt@linux.intel.com>
To: linux-pm@vger.kernel.org, rafael.j.wysocki@intel.com, rjw@rjwysocki.net
Cc: todd.e.brandt@linux.intel.com, todd.e.brandt@intel.com
Subject: [PATCH v2] PM: dpm_show_time changes to suspend/resume dmesg prints
Date: Mon, 31 Aug 2026 15:29:26 -0700 [thread overview]
Message-ID: <20260831222926.34698-1-todd.e.brandt@linux.intel.com> (raw)
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");
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
next reply other threads:[~2026-08-31 22:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 22:29 Todd Brandt [this message]
2026-09-03 4:15 ` [PATCH v2] PM: dpm_show_time changes to suspend/resume dmesg prints kernel test robot
2026-09-04 13:18 ` Rafael J. Wysocki (Intel)
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=20260831222926.34698-1-todd.e.brandt@linux.intel.com \
--to=todd.e.brandt@linux.intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=todd.e.brandt@intel.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