Lockless patterns: full memory barriers
Lockless patterns: full memory barriers
Posted Mar 15, 2021 14:35 UTC (Mon) by firolwn (guest, #96711)In reply to: Lockless patterns: full memory barriers by firolwn
Parent article: Lockless patterns: full memory barriers
After reading 'Multicopy atomicity' section from kernel Documentation/memory-barriers.txt, I realize that I am wrong and no more smp_mb() is necessary to add.
--
Firo
--
Firo
Posted Apr 16, 2021 7:01 UTC (Fri)
by pbonzini (subscriber, #60935)
[Link]
Lockless patterns: full memory barriers
It's not intuitive at all, but only one memory barrier matters in each of the two cases. But both are needed (separately) to ensure that x=0 && y = 0 is not possible.
