Skip to content

Commit 253a0fb

Browse files
valschneiderPeter Zijlstra
authored andcommitted
smp: reword smp call IPI comment
Accessing the call_single_queue hasn't involved a spinlock since 2014: 6897fc2 ("kernel: use lockless list for smp_call_function_single") The llist operations (namely cmpxchg() and xchg()) provide similar ordering guarantees, update the comment to lessen confusion. Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20230307143558.294354-7-vschneid@redhat.com
1 parent 4c8c3c7 commit 253a0fb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

kernel/smp.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,10 @@ static DEFINE_PER_CPU_SHARED_ALIGNED(call_single_data_t, csd_data);
312312
void __smp_call_single_queue(int cpu, struct llist_node *node)
313313
{
314314
/*
315-
* The list addition should be visible before sending the IPI
316-
* handler locks the list to pull the entry off it because of
317-
* normal cache coherency rules implied by spinlocks.
315+
* The list addition should be visible to the target CPU when it pops
316+
* the head of the list to pull the entry off it in the IPI handler
317+
* because of normal cache coherency rules implied by the underlying
318+
* llist ops.
318319
*
319320
* If IPIs can go out of order to the cache coherency protocol
320321
* in an architecture, sufficient synchronisation should be added

0 commit comments

Comments
 (0)