[PATCH] sched/idle: Stop the tick when no cpuidle driver is available

Christian Loehle <[email protected]>
Newsgroups org.kernel.vger.linux-pm,dev.linux.lists.regressions,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Commit f4c31b07b136 ("sched: idle: Consolidate the handling of two
special cases") changed the no-cpuidle-driver path to use the previous
tick wakeup heuristic.

Oracle reported a substantial sysbench regression on small OCI VM shapes
with no cpuidle driver available. Reverting the commit recovered the lost
performance.

Restore the previous tick handling for the no-driver case while retaining
the heuristic for the single-state cpuidle case.

Fixes: f4c31b07b136 ("sched: idle: Consolidate the handling of two special cases")
Reported-by: Joseph Salisbury <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Christian Loehle <[email protected]>
---
Here's the actual patch, I'd still be curious about why this happens here...

 kernel/sched/idle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 052435f4d3e3..a814f9d5759f 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -194,7 +194,7 @@ static void cpuidle_idle_call(bool stop_tick)
 	}
 
 	if (cpuidle_not_available(drv, dev)) {
-		idle_call_stop_or_retain_tick(stop_tick);
+		tick_nohz_idle_stop_tick();
 
 		default_idle_call();
 		goto exit_idle;
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.