Skip to content

Commit a12a498

Browse files
YuryNorovKAGA-KOKO
authored andcommitted
smp: Don't wait for remote work done if not needed in smp_call_function_many_cond()
If there are no IPIs sent, then there is no need to wait for a job completion of non existant remote execution. Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250623000010.10124-4-yury.norov@gmail.com
1 parent 976e0e3 commit a12a498

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/smp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,8 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
849849
send_call_function_single_ipi(last_cpu);
850850
else if (likely(nr_cpus > 1))
851851
send_call_function_ipi_mask(cfd->cpumask_ipi);
852+
else
853+
run_remote = false;
852854
}
853855

854856
if (run_local) {

0 commit comments

Comments
 (0)