The following commit has been merged into the smp/core branch of tip:
Commit-ID: a12a498a9738db65152203467820bb15b6102bd2
Gitweb: https://git.kernel.org/tip/a12a498a9738db65152203467820bb15b6102bd2
Author: Yury Norov [NVIDIA] <yury.norov@gmail.com>
AuthorDate: Sun, 22 Jun 2025 20:00:08 -04:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 26 Jun 2025 23:46:35 +02:00
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
---
kernel/smp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/smp.c b/kernel/smp.c
index 5871acf..7151906 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -849,6 +849,8 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
send_call_function_single_ipi(last_cpu);
else if (likely(nr_cpus > 1))
send_call_function_ipi_mask(cfd->cpumask_ipi);
+ else
+ run_remote = false;
}
if (run_local) {