Skip to content

Commit 036c94c

Browse files
Andrew Sayersrafaeljw
authored andcommitted
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 a449dfb 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>
1 parent 443046d commit 036c94c

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

kernel/power/process.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void thaw_processes(void)
189189

190190
oom_killer_enable();
191191

192-
pr_info("Restarting tasks ... ");
192+
pr_info("Restarting tasks ...\n");
193193

194194
__usermodehelper_set_disable_depth(UMH_FREEZING);
195195
thaw_workqueues();
@@ -208,7 +208,7 @@ void thaw_processes(void)
208208
usermodehelper_enable();
209209

210210
schedule();
211-
pr_cont("done.\n");
211+
pr_info("Done restarting tasks.\n");
212212
trace_suspend_resume(TPS("thaw_processes"), 0, false);
213213
}
214214

@@ -217,7 +217,7 @@ void thaw_kernel_threads(void)
217217
struct task_struct *g, *p;
218218

219219
pm_nosig_freezing = false;
220-
pr_info("Restarting kernel threads ... ");
220+
pr_info("Restarting kernel threads ...\n");
221221

222222
thaw_workqueues();
223223

@@ -229,5 +229,5 @@ void thaw_kernel_threads(void)
229229
read_unlock(&tasklist_lock);
230230

231231
schedule();
232-
pr_cont("done.\n");
232+
pr_info("Done restarting kernel threads.\n");
233233
}

tools/power/pm-graph/sleepgraph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4017,7 +4017,8 @@ def parseKernelLog(data):
40174017
'PM: early restore of devices complete after.*'],
40184018
'resume_complete': ['PM: resume of devices complete after.*',
40194019
'PM: restore of devices complete after.*'],
4020-
'post_resume': [r'.*Restarting tasks \.\.\..*'],
4020+
'post_resume': [r'.*Restarting tasks \.\.\..*',
4021+
'Done restarting tasks.*'],
40214022
}
40224023

40234024
# action table (expected events that occur and show up in dmesg)

0 commit comments

Comments
 (0)