[Skiboot] [PATCH 2/8] cpu: cpu_idle_job SMT priority fix

Nicholas Piggin npiggin at gmail.com
Sun Oct 3 12:22:04 AEDT 2021


Calling cpu_relax resets the SMT priority to medium, causing the idle
loop not to run with lowest priority. Just use barrier() instead, this
saves about 3 seconds on a SMT4 systemsim (mambo) boot.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 core/cpu.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/core/cpu.c b/core/cpu.c
index f58aeb27a..5c10fc6e8 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -547,7 +547,6 @@ void cpu_idle_job(void)
 		while (!cpu_check_jobs(cpu)) {
 			if (pm_enabled)
 				break;
-			cpu_relax();
 			barrier();
 		}
 		smt_medium();
-- 
2.23.0



More information about the Skiboot mailing list