diff mbox series

[2/8] cpu: cpu_idle_job SMT priority fix

Message ID 20211003012210.1165606-3-npiggin@gmail.com
State Accepted
Headers show
Series various fixes | expand

Commit Message

Nicholas Piggin Oct. 3, 2021, 1:22 a.m. UTC
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@gmail.com>
---
 core/cpu.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

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();