简体   繁体   English

缓存行是否刷新访问TLB?

[英]Does a cache line flush access the TLB?

Assuming that we have intentionally thrashed the DTLB, and would like to proceed to flush a specific cache line from L1-3 using clflush on a memory region which is (most likely) disjoint from the addresses pointed to by the TLB entries; 假设我们故意破坏了DTLB,并且希望继续使用clflushclflush刷新特定的高速缓存行,该内存区域(很可能)与TLB条目指向的地址不相交; would this in fact bring the page base address of the cache line we are flushing back into the TLB? 这实际上会把我们正在刷新的缓存行的页面基地址带回TLB吗?

In short, does a clflush touch the TLB at all? 简而言之, clflush是否clflush接触TLB? I'm assuming that due to this instruction honouring coherency, it will subsequently write that line back to memory (obviously needing a TLB look-up.) 我假设由于这条指令尊重一致性,它随后将该行写回内存(显然需要TLB查找。)

From Intel® 64 and IA-32 Architectures Software Developer's Manual, Volume 2A: Instruction Set Reference, AL: "Invalidates the cache line that contains the linear address specified with the source operand from all levels of the processor cache hierarchy (data and instruction) ." 英特尔®64和IA-32架构软件开发人员手册,第2A卷:指令集参考,AL:“使包含来自处理器缓存层次结构的所有级别(数据和指令)的源操作数指定的线性地址的缓存行无效” “。

Since it uses the linear (virtual) address, the address needs to be translated, which means that a page table walk would be needed on a TLB miss. 由于它使用线性(虚拟)地址,因此需要转换地址,这意味着在TLB未命中时需要页面表行走。 (This would generally be the case even for a different kind of instruction that pushed cache entries out to higher levels of cache since L1 caches are typically physically tagged for x86. In general, tagging with the virtual address has fallen out of favor. Using the physical address for tags means that the physical address is needed to check the cache for a hit, so even if it was not sent to memory, translation would be needed.) (即使对于将缓存条目推送到更高级别的缓存的不同类型的指令通常也是如此,因为L1缓存通常在物理上标记为x86。通常,使用虚拟地址标记已经失宠。使用标签的物理地址意味着需要物理地址来检查命中的缓存,因此即使它没有发送到内存,也需要进行转换。)

While it would be possible to avoid loading the TLB for such accesses, the extra complexity of such special-case handling would almost certainly not be viewed as worth the bother given that CLFLUSH is not commonly used. 虽然有可能避免加载TLB这样的访问,这样的特殊情况下处理额外的复杂性几乎肯定不会被视为值得费心考虑到CLFLUSH不常用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM