diff options
author | Joel Fernandes <joelagnelf@nvidia.com> | 2025-07-15 16:01:51 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2025-07-17 12:11:13 -0700 |
commit | cf4fc66746e344181f41604066659073dbb8aaf0 (patch) | |
tree | 6a30070c53af23fac7042f45a8839e3716ee18d3 /lib/crypto/mpi/mpiutil.c | |
parent | fc6f89dc707838564abbb8e22dad8e4d75c7fa26 (diff) |
smp: Document preemption and stop_machine() mutual exclusion
Recently while revising RCU's cpu online checks, there was some discussion
around how IPIs synchronize with hotplug.
Add comments explaining how preemption disable creates mutual exclusion with
CPU hotplug's stop_machine mechanism. The key insight is that stop_machine()
atomically updates CPU masks and flushes IPIs with interrupts disabled, and
cannot proceed while any CPU (including the IPI sender) has preemption
disabled.
[ Apply peterz feedback. ]
Cc: Andrea Righi <arighi@nvidia.com>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: rcu@vger.kernel.org
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Co-developed-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions