4 ms·
No, the x86 ISA guarantees only that the writes are never reordered (unless they are marked as non-temporal or they are made to write-combining memory). The re
by adrian_b 5y ago
No, the x86 ISA guarantees only that the writes are never reordered (unless they are marked as non-temporal or they are made to write-combining memory).
The reads can always be reordered, unless they access uncacheable memory, which can happen only in device drivers, not in normal applications.
x86 provides 3 memory fences (LFENCE, SFENCE, MFENCE) which must be used when you need a certain ordering of the reads or of the reads around writes.
- adrian_b 5y agoSomeone who downvoted this was right, my memory was wrong. On x86, reads can be reordered between themselves only for non-temporal transfers. For the normal case, when the accesses are made to cacheable read-write memory, the reads are not reordered between themselves.