Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PM: sleep: Use two lines for "Restarting..." / "done" messages

Other messages are occasionally printed between these two, for example:

[203104.106534] Restarting tasks ...
[203104.106559] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[203104.112354] done.

This seems to be a timing issue, seen in two of the eleven
hibernation exits in my current `dmesg` output.

When printed on its own, the "done" message has the default log level.
This makes the output of `dmesg --level=warn` quite misleading.

Add enough context for the "done" messages to make sense on their own,
and use the same log level for all messages.

Change the messages to "<event>..." / "Done <event>.", unlike a449dfbfc089
which uses "<event>..." / "<event> completed.". Front-loading the unique
part of the message makes it easier to scan the log, and reduces ambiguity
for users who aren't confident in their English comprehension.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Andrew Sayers <kernel.org@pileofstuff.org>
Link: https://patch.msgid.link/20250411152632.2806038-1-kernel.org@pileofstuff.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Andrew Sayers and committed by
Rafael J. Wysocki
036c94c9 443046d1

+6 -5
+4 -4
kernel/power/process.c
··· 189 189 190 190 oom_killer_enable(); 191 191 192 - pr_info("Restarting tasks ... "); 192 + pr_info("Restarting tasks ...\n"); 193 193 194 194 __usermodehelper_set_disable_depth(UMH_FREEZING); 195 195 thaw_workqueues(); ··· 208 208 usermodehelper_enable(); 209 209 210 210 schedule(); 211 - pr_cont("done.\n"); 211 + pr_info("Done restarting tasks.\n"); 212 212 trace_suspend_resume(TPS("thaw_processes"), 0, false); 213 213 } 214 214 ··· 217 217 struct task_struct *g, *p; 218 218 219 219 pm_nosig_freezing = false; 220 - pr_info("Restarting kernel threads ... "); 220 + pr_info("Restarting kernel threads ...\n"); 221 221 222 222 thaw_workqueues(); 223 223 ··· 229 229 read_unlock(&tasklist_lock); 230 230 231 231 schedule(); 232 - pr_cont("done.\n"); 232 + pr_info("Done restarting kernel threads.\n"); 233 233 }
+2 -1
tools/power/pm-graph/sleepgraph.py
··· 4017 4017 'PM: early restore of devices complete after.*'], 4018 4018 'resume_complete': ['PM: resume of devices complete after.*', 4019 4019 'PM: restore of devices complete after.*'], 4020 - 'post_resume': [r'.*Restarting tasks \.\.\..*'], 4020 + 'post_resume': [r'.*Restarting tasks \.\.\..*', 4021 + 'Done restarting tasks.*'], 4021 4022 } 4022 4023 4023 4024 # action table (expected events that occur and show up in dmesg)