mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
cpu/hotplug: Abort disabling secondary CPUs if wakeup is pending
When "deep" suspend is enabled, all CPUs except the primary CPU are frozen via CPU hotplug one by one. After all secondary CPUs are unplugged the wakeup pending condition is evaluated and if pending the suspend operation is aborted and the secondary CPUs are brought up again. CPU hotplug is a slow operation, so it makes sense to check for wakeup pending in the freezer loop before bringing down the next CPU. This improves the system suspend abort latency significantly. [ tglx: Massaged changelog and improved printk message ] Signed-off-by: Pavankumar Kondeti <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Len Brown <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: iri Kosina <[email protected]> Cc: Mukesh Ojha <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
This commit is contained in:
1 parent
f560201102
commit
a66d955e91
1 file changed
+7
@@ -1221,6 +1221,13 @@ int freeze_secondary_cpus(int primary)
|
||||
for_each_online_cpu(cpu) {
|
||||
if (cpu == primary)
|
||||
continue;
|
||||
|
||||
if (pm_wakeup_pending()) {
|
||||
pr_info("Wakeup pending. Abort CPU freeze\n");
|
||||
error = -EBUSY;
|
||||
break;
|
||||
}
|
||||
|
||||
trace_suspend_resume(TPS("CPU_OFF"), cpu, true);
|
||||
error = _cpu_down(cpu, 1, CPUHP_OFFLINE);
|
||||
trace_suspend_resume(TPS("CPU_OFF"), cpu, false);
|
||||
|
||||
Reference in new issue
Block a user