Memory Type:
目前的主流处理器,都支持这些memory type Write Back, Write Through, Write Protect,Uncacheable Write, Write Combine
Write Back
最常见的 cacheable write, read → modify→ write
Write Through
- cachable read
write: - when hit in cache, update cache and memory
- when miss in cache, update memory only
Uncacheable Write
- IO操作
- Strong ordered
Write Protected
- write uncacheable
- read cacheable
Write Combine
-
Uncacheable
-
使用write combine buffer,或者是fill buffer
在最新的Micro架构中使用write combine buffer,早期的处理器使用fill buffer,在fill buffer的每一个entry中增加属性,来表明当前entry的状态。 -
weakly ordered
和上文说的untemporal store是一个意思, 比如图像和大矩阵的计算,不需要存入cache,因为数据量大,不仅后续的数据不会再次使用,而且会将cache中本来存着的有用的数据剔除出去,而导致性能下降,这时候就使用write combine类型。
欢迎关注我的公众号《处理器与AI芯片》