4 ms·
The answer is yes, if the processor supports PCID: https://news.ycombinator.com/item?id=16094349 https://news.ycombinator.com/item?id=16094349 Simplistically
by rzzzt 9y ago
The answer is yes, if the processor supports PCID: https://news.ycombinator.com/item?id=16094349 https://news.ycombinator.com/item?id=16094349
Simplistically, it allows TLB-cached page table contents to be tagged with a
context identifier, and limits the lookups in the TLB to only match within
the currently allowed context. TLB cached entires with a different PCID will
be ignored.
- hansendc 9y agoI think you are confusing the TLB and processor data caches. PCIDs exist for virtual addresses and are implemented in the TLB, not the processor caches. The processor caches are physically indexed, not virtually indexed. So, does the processor cache have a mechanism to tell which "process" to which a given line belongs? Nope. Two processes (or a process and the kernel) that share memory can be in two PCIDs, but share the processor caches.
- rzzzt 9y agoYou are correct. My assumption was that the original question is not focused on the data cache itself, and so the DTLB does qualify for "knowing" what belongs to which context.