2

I've found that TLB contains PID of each process for performance reason, which means by leaving each process's VA to PA mappings in TLB for saving context-switching cost. So, my question is can kernel manipulate that PID entries in TLB?

I am really curious because I have heard that TLB is a cache maintained inside MMU. Please give me answer :)

*I assume x86 :)

1 Answer 1

3

Intel® 64 and IA-32 Architectures Software Developer's Manual

Process-Context Identifiers (PCIDs)

Process-context identifiers (PCIDs) are a facility by which a logical processor may cache information for multiple linear-address spaces. The processor may retain cached information when software switches to a different linear-address space with a different PCID (e.g., by loading CR3; see Section 4.10.4.1 for details). A PCID is a 12-bit identifier.

...

When a logical processor creates entries in the TLBs (Section 4.10.2) and paging structure caches (Section 4.10.3), it associates those entries with the current PCID. When using entries in the TLBs and paging-structure caches to translate a linear address, a logical processor uses only those entries associated with the current PCID

Related: Does Linux use x86 CPU's PCID feature for TLB? If not, why?

1
  • Thanks for your answer
    – ruach
    Commented Dec 23, 2015 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.