Hacker News new | past | comments | ask | show | jobs | submit login

This took me a while to click, but:

- cache entries are assumed to be looked up by the virtual address (not physical), to save a TLB lookup

- within a single page, the page line index is the same in both a physical and a virtual address

- if the cache has enough sets, it doesn't just use the line bits, but also some bits of the page address

Here's the crucial bit: a single physical page address may correspond to several different virtual addresses, so if the cache kept using virtual addresses, it might have had many copies of the same line. Kaboom.

That's why having more sets in a cache than lines in a page is troublesome.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: