Virtually addressed Cache

那年仲夏 提交于 2019-12-20 04:04:08

问题


Relation between cache size and page size

How does the associativity and page size constrain the Cache size in virtually addressed cache architecture?

Particularly I am looking for an example on the following statement:
If C≤(page_size x associativity), the cache index bits come only from page offset (same in Virtual address and Physical address).


回答1:


Intel CPUs have used 8-way associative 32kiB L1D with 64B lines for many years, for exactly this reason. Pages are 4k, so the page offset is 12 bits, exactly the same number of bits that make up the index and offset within a cache line.

See the "L1 also uses speed tricks that wouldn't work if it was larger" paragraph in this answer for more details about how it lets the cache avoid aliasing problems like a PIPT cache, but still be as fast as a VIPT cache.

The idea is that the virtual address bits below the page offset are already physical address bits. So a VIPT cache that works this way is more like a PIPT cache with free translation of the index bits.



来源:https://stackoverflow.com/questions/39436982/virtually-addressed-cache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!