[go: up one dir, main page]

|
|
Log in / Subscribe / Register

sys_membarrier()

sys_membarrier()

Posted Jan 18, 2010 12:48 UTC (Mon) by ikm (subscriber, #493)
Parent article: sys_membarrier()

Do I understand right that the idea is to make CPUs execute memory barriers only when the variable is changed, as opposed to executing them each time before accessing it?


to post comments

sys_membarrier()

Posted Jan 20, 2010 23:26 UTC (Wed) by compudj (subscriber, #43335) [Link]

In essence, yes, the read-side memory barriers are only executed when the updater requires that synchronization. With RCU, we only have to execute the barriers each time a synchronize_rcu() is called, which occurs typically far less often than variable updates.

Rephrasing what you said: "the idea is to make CPUs execute memory barriers only when synchronization is required by the updater thread, as opposed to executing them each time before and after accessing it from a reader thread".

Thanks,

Mathieu


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