Commit 946a728
smp: Wait only if work was enqueued
Whenever work is enqueued for a remote CPU, smp_call_function_many_cond()
may need to wait for that work to be completed. However, if no work is
enqueued for a remote CPU, because the condition func() evaluated to false
for all CPUs, there is no need to wait.
Set run_remote only if work was enqueued on remote CPUs.
Document the difference between "work enqueued", and "CPU needs to be
woken up"
Suggested-by: Jann Horn <jannh@google.com>
Signed-off-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
Link: https://lore.kernel.org/all/20250703203019.11331ac3@fangorn1 parent e0e9506 commit 946a728
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
802 | 802 | | |
803 | 803 | | |
804 | 804 | | |
805 | | - | |
806 | 805 | | |
807 | 806 | | |
808 | 807 | | |
| |||
816 | 815 | | |
817 | 816 | | |
818 | 817 | | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
819 | 821 | | |
820 | 822 | | |
821 | 823 | | |
| |||
827 | 829 | | |
828 | 830 | | |
829 | 831 | | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
830 | 836 | | |
831 | 837 | | |
832 | 838 | | |
| |||
0 commit comments