LWN: Comments on "sys_membarrier()" https://lwn.net/Articles/369567/ This is a special feed containing comments posted to the individual LWN article titled "sys_membarrier()". en-us Wed, 06 Nov 2024 00:32:49 +0000 Wed, 06 Nov 2024 00:32:49 +0000 https://www.rssboard.org/rss-specification [email protected] sys_membarrier() https://lwn.net/Articles/370522/ https://lwn.net/Articles/370522/ compudj <div class="FormattedComment"> 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.<br> <p> 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".<br> <p> Thanks,<br> <p> Mathieu<br> </div> Wed, 20 Jan 2010 23:26:31 +0000 sys_membarrier() https://lwn.net/Articles/370189/ https://lwn.net/Articles/370189/ ikm <div class="FormattedComment"> 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?<br> </div> Mon, 18 Jan 2010 12:48:19 +0000