News for hackers. Stuff that matters.
Re:CPU Cache Flushing Fallacy by bnegreve on Thursday February 14, 2013 @03:10PM (#5221832)
Note that locking primitives include memory fences, that's why you are not confronted with re-ordering problems unless you do lockfree multicore programming.

From my experience, the fence is much costlier than the actual locking (at least on Linux, thanks to Futexes [1]). So unless you're going to put your hands in the dirt and remove the fence, it is useless and error prone to remove the locking, just because you believe it is not necessary.

[1] http://en.wikipedia.org/wiki/Futex

There are no comments on this comment yet.