写操作写回NVM的顺序与缓存的关系

Px86:

instead there are multiple volatile caches in between. As such, writes may not propagate to memory at the time and in the order that the processor issues them, but rather at a later time and in the order decided by the cache coherence protocol.

这里的说法是受缓存一致性协议的约束。关于具体缓存一致性和WMM之间是什么关系还需要调研 see 和内存模型之间的关系

实际上缓存本来应该是透明的,在考虑多线程程序的执行时不需要考虑它。但是对于NVM来说,write-back类型的缓存会导致持久化的顺序不确定。(缓存异步写回发生在cache miss or when cache reaches capacity limit)

可以这么理解,Px86 之所以会出现不确定的nvo顺序,就是因为内存层级中的多层缓存导致的。而因为硬件保证对同一个位置的操作是有序的,所以对一个位置的写的持久化顺序应该和可见顺序相同。