|
|
Subscribe / Log in / New account

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


to post comments

Lockless patterns: full memory barriers

Posted Apr 16, 2021 7:01 UTC (Fri) by pbonzini (subscriber, #60935) [Link]

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.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds