内核可以管理写在 TLB 条目上的进程 ID 吗?
Can kernel manages Process id written on TLB entry?
我发现出于性能原因,TLB 包含每个进程的 PID,这意味着通过将每个进程的 VA 到 PA 映射留在 TLB 中以节省上下文切换成本。所以,我的问题是内核可以操纵 TLB 中的 PID 条目吗?
我很好奇,因为听说TLB是MMU内部维护的缓存。请给我答案:)
*我假设 x86 :)
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
相关:Does Linux use x86 CPU's PCID feature for TLB? If not, why?
我发现出于性能原因,TLB 包含每个进程的 PID,这意味着通过将每个进程的 VA 到 PA 映射留在 TLB 中以节省上下文切换成本。所以,我的问题是内核可以操纵 TLB 中的 PID 条目吗?
我很好奇,因为听说TLB是MMU内部维护的缓存。请给我答案:)
*我假设 x86 :)
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
相关:Does Linux use x86 CPU's PCID feature for TLB? If not, why?