从 ARM VIVT 看 cache


do_wp_page 的VIVT 考虑


Cache 的基本知识
用两个例子和图形分析下啥是index,啥是tag:



K8 4k 2-way cache, cache line 64B




ARM920T (SAM SUNG 2410a) I-cache :16k 64-way  cache,  32B cache line

从ARM VIVT看linux的cache 处理



VIVT VIPT


Cache Alias 


page color


virtual hints


这里顺便提下, 和cache alias相类似的问题是 Ambiguity: 不同的物理地址映射到相同的VA. 这种情况下在linux内, 只有不同进程的用户空间的页面才可能(fix me). 这种情况会造成同一个cache line在不同的进程中代表不同的数据, 切换进程的时候看似invalid user space 的cache必须进行.  实际上这个也要看是VIVT还是VIPT.


ARM cache的一些讨论
#endif

相关文章:

  • 2022-01-04
  • 2021-08-08
  • 2022-12-23
  • 2021-04-07
  • 2021-11-18
  • 2021-08-01
  • 2021-11-20
猜你喜欢
  • 2021-06-01
  • 2022-12-23
  • 2021-06-22
  • 2021-07-30
  • 2021-05-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案