美文网首页
GPU Cache Clean and Invalidate

GPU Cache Clean and Invalidate

作者: 陈成_Adam | 来源:发表于2023-06-20 22:25 被阅读0次

    我们经常听到 Cache Flush,它的含义是:Clean 并且 Invalidate Cache。

    那什么是 Clean Cache 操作,什么是 Invalidate Cache 操作?

    • Invalidate Cache

      • 重置 Cache 或者 Cache line 的有效位。如果 Cache 中还存在“脏”数据,那么直接进行 Invalidate 操作将导致错误。例如,一个写回策略采用 Write-back 的 Cache,如果直接进行 Invalidate 操作,很多有效数据将失。
    • Clean Cache

      • 将“脏”的 Cache-line 的数据写回显存,并重置 Cache-line 的有效位。该操作可以保证 Cache 和显存数据的一致性。该操作常用于采用 Write-back 写回策略的 Cache。

    详细参看:ARM Cortex-A Series Programmer's Guide for ARMv7-A

    相关文章

      网友评论

          本文标题:GPU Cache Clean and Invalidate

          本文链接:https://www.haomeiwen.com/subject/aaluydtx.html