[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <167361307427.4906.15441555774819619097.tip-bot2@tip-bot2>
Date: Fri, 13 Jan 2023 12:31:14 -0000
From: "tip-bot2 for Peter Zijlstra" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Tony Lindgren <tony@...mide.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Frederic Weisbecker <frederic@...nel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/core] cpuidle, armada: Push RCU-idle into driver
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 4ce40e9dbe83153f60d7e4ccd24a1eb4f8264f6a
Gitweb: https://git.kernel.org/tip/4ce40e9dbe83153f60d7e4ccd24a1eb4f8264f6a
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Thu, 12 Jan 2023 20:43:24 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Fri, 13 Jan 2023 11:47:27 +01:00
cpuidle, armada: Push RCU-idle into driver
Doing RCU-idle outside the driver, only to then temporarily enable it
again before going idle is suboptimal.
Notably the cpu_pm_*() calls implicitly re-enable RCU for a bit.
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Tested-by: Tony Lindgren <tony@...mide.com>
Tested-by: Ulf Hansson <ulf.hansson@...aro.org>
Reviewed-by: Frederic Weisbecker <frederic@...nel.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Link: https://lore.kernel.org/r/20230112195539.946630819@infradead.org
---
drivers/cpuidle/cpuidle-mvebu-v7.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/cpuidle/cpuidle-mvebu-v7.c b/drivers/cpuidle/cpuidle-mvebu-v7.c
index 01a8569..c9568aa 100644
--- a/drivers/cpuidle/cpuidle-mvebu-v7.c
+++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
@@ -36,7 +36,10 @@ static int mvebu_v7_enter_idle(struct cpuidle_device *dev,
if (drv->states[index].flags & MVEBU_V7_FLAG_DEEP_IDLE)
deepidle = true;
+ ct_idle_enter();
ret = mvebu_v7_cpu_suspend(deepidle);
+ ct_idle_exit();
+
cpu_pm_exit();
if (ret)
@@ -49,6 +52,7 @@ static struct cpuidle_driver armadaxp_idle_driver = {
.name = "armada_xp_idle",
.states[0] = ARM_CPUIDLE_WFI_STATE,
.states[1] = {
+ .flags = CPUIDLE_FLAG_RCU_IDLE,
.enter = mvebu_v7_enter_idle,
.exit_latency = 100,
.power_usage = 50,
@@ -57,6 +61,7 @@ static struct cpuidle_driver armadaxp_idle_driver = {
.desc = "CPU power down",
},
.states[2] = {
+ .flags = CPUIDLE_FLAG_RCU_IDLE,
.enter = mvebu_v7_enter_idle,
.exit_latency = 1000,
.power_usage = 5,
@@ -72,6 +77,7 @@ static struct cpuidle_driver armada370_idle_driver = {
.name = "armada_370_idle",
.states[0] = ARM_CPUIDLE_WFI_STATE,
.states[1] = {
+ .flags = CPUIDLE_FLAG_RCU_IDLE,
.enter = mvebu_v7_enter_idle,
.exit_latency = 100,
.power_usage = 5,
@@ -87,6 +93,7 @@ static struct cpuidle_driver armada38x_idle_driver = {
.name = "armada_38x_idle",
.states[0] = ARM_CPUIDLE_WFI_STATE,
.states[1] = {
+ .flags = CPUIDLE_FLAG_RCU_IDLE,
.enter = mvebu_v7_enter_idle,
.exit_latency = 10,
.power_usage = 5,
Powered by blists - more mailing lists