[Skiboot] [PATCH v2 4/6] core/cpu: move cpu_wake out of job_lock

Nicholas Piggin npiggin at gmail.com
Fri Dec 17 13:17:22 AEDT 2021


There is no need to send the IPI while holding the job_lock. If the
target does wake after the job is queued and before we send the IPI,
it will check for new jobs anyway.

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

diff --git a/core/cpu.c b/core/cpu.c
index e915d44fe..a1ef6319a 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -198,8 +198,9 @@ static void queue_job_on_cpu(struct cpu_thread *cpu, struct cpu_job *job)
 		cpu->job_has_no_return = true;
 	else
 		cpu->job_count++;
-	cpu_wake(cpu);
 	unlock(&cpu->job_lock);
+
+	cpu_wake(cpu);
 }
 
 struct cpu_job *__cpu_queue_job(struct cpu_thread *cpu,
-- 
2.23.0



More information about the Skiboot mailing list