[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1559536263-16472-1-git-send-email-pkondeti@codeaurora.org>
Date: Mon, 3 Jun 2019 10:01:03 +0530
From: Pavankumar Kondeti <pkondeti@...eaurora.org>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
iri Kosina <jkosina@...e.cz>,
Mukesh Ojha <mojha@...eaurora.org>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Pavankumar Kondeti <pkondeti@...eaurora.org>
Subject: [PATCH] cpu/hotplug: Abort disabling secondary CPUs if wakeup is pending
When "deep" suspend is enabled, all CPUs except the primary CPU
are hotplugged out. Since CPU hotplug is a costly operation,
check if we have to abort the suspend in between each CPU
hotplug. This would improve the system suspend abort latency
upon detecting a wakeup condition.
Signed-off-by: Pavankumar Kondeti <pkondeti@...eaurora.org>
---
kernel/cpu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index f2ef104..784b33d 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("Aborting disabling non-boot CPUs..\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);
--
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Powered by blists - more mailing lists