how to use movntdqa to avoid cache pollution?

前端 未结 1 864
鱼传尺愫
鱼传尺愫 2021-02-13 19:16

i am trying to write a memcpy function that does not load the source memory to the cpu cache. The purpose is to avoid cache pollution. The memcpy function below works, but poll

相关标签:
1条回答
  • 2021-02-13 20:19

    Quoting from Intel:

    "The streaming load instruction is intended to accelerate data transfers from the USWC memory type. For other memory types such as cacheable (WB) or Uncacheable (UC), the instruction behaves as a typical 16-byte MOVDQA load instruction. However, future processors may use the streaming load instruction for other memory types (such as WB) as a hint that the intended cache line should be streamed from memory directly to the core while minimizing cache pollution."

    That explains why the code does not work — the memory is of type WB.

    0 讨论(0)
提交回复
热议问题