[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a66d955e910ab0e598d7a7450cbe6139f52befe7@git.kernel.org>
Date: Wed, 12 Jun 2019 05:34:08 -0700
From: tip-bot for Pavankumar Kondeti <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: konrad.wilk@...cle.com, mojha@...eaurora.org, jkosina@...e.cz,
mingo@...nel.org, hpa@...or.com, rjw@...ysocki.net,
tglx@...utronix.de, peterz@...radead.org,
linux-kernel@...r.kernel.org, len.brown@...el.com,
pkondeti@...eaurora.org, jpoimboe@...hat.com, pavel@....cz
Subject: [tip:smp/hotplug] cpu/hotplug: Abort disabling secondary CPUs if
wakeup is pending
Commit-ID: a66d955e910ab0e598d7a7450cbe6139f52befe7
Gitweb: https://git.kernel.org/tip/a66d955e910ab0e598d7a7450cbe6139f52befe7
Author: Pavankumar Kondeti <pkondeti@...eaurora.org>
AuthorDate: Mon, 3 Jun 2019 10:01:03 +0530
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 12 Jun 2019 11:03:05 +0200
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 <pkondeti@...eaurora.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Len Brown <len.brown@...el.com>
Cc: Pavel Machek <pavel@....cz>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc: iri Kosina <jkosina@...e.cz>
Cc: Mukesh Ojha <mojha@...eaurora.org>
Cc: linux-pm@...r.kernel.org
Link: https://lkml.kernel.org/r/1559536263-16472-1-git-send-email-pkondeti@codeaurora.org
---
kernel/cpu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index be82cbc11a8a..0778249cd49d 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -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);
Powered by blists - more mailing lists