diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2024-12-03 19:35:58 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-12-05 16:25:28 +0300 |
commit | 63a48181fbcddefe5fb4c6618938bb64c543945b (patch) | |
tree | 203e7fa55596c828d847b37c6cf971c915ad1976 /rust/helpers/mutex.c | |
parent | d387ceb17149fed4d85a1ec01b3d65ae0204060d (diff) | |
download | linux-63a48181fbcddefe5fb4c6618938bb64c543945b.tar.xz |
smp/scf: Evaluate local cond_func() before IPI side-effects
In smp_call_function_many_cond(), the local cond_func() is evaluated
after triggering the remote CPU IPIs.
If cond_func() depends on loading shared state updated by other CPU's
IPI handlers func(), then triggering execution of remote CPUs IPI before
evaluating cond_func() may have unexpected consequences.
One example scenario is evaluating a jiffies delay in cond_func(), which
is updated by func() in the IPI handlers. This situation can prevent
execution of periodic cleanup code on the local CPU.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Rik van Riel <riel@surriel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20241203163558.3455535-1-mathieu.desnoyers@efficios.com
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions