On 09/06/2016 13:28, Borislav Petkov wrote: >> > technically, they should be virt_rmb() -- it really doesn't matter of >> > course because reads are never reordered on x86. > You mean > > version = src->version; > flags = src->flags; > > are not reordered? > > I don't think so.
The compiler can reorder them, so smp_rmb() and virt_rmb() have to be barrier(), but the processor won't. x86 will only move a store after a subsequent load, if you exclude special cases such as write combining, non-temporal moves and the like. LFENCE and SFENCE are only needed for those special cases. Paolo

