查看 TLB 信息
方法1
root@aliyun:~# cpuid | grep -i tlb
cache and TLB information (2):
0x63: data TLB: 1G pages, 4-way, 4 entries # 数据
0x03: data TLB: 4K pages, 4-way, 64 entries # 数据
0x76: instruction TLB: 2M/4M pages, fully, 8 entries # 指令
0xb5: instruction TLB: 4K, 8-way, 64 entries # 指令
0xc3: L2 TLB: 4K/2M pages, 6-way, 1536 entries
L1 TLB/cache information: 2M/4M pages & L1 TLB (0x80000005/eax):
L1 TLB/cache information: 4K pages & L1 TLB (0x80000005/ebx):
L2 TLB/cache information: 2M/4M pages & L2 TLB (0x80000006/eax):
L2 TLB/cache information: 4K pages & L2 TLB (0x80000006/ebx):
方法2
root@aliyun:~# cpuid | grep -E "L1|L2|L3"
context ID: adaptive or shared L1 data = false
0xc3: L2 TLB: 4K/2M pages, 6-way, 1536 entries
L1 TLB/cache information: 2M/4M pages & L1 TLB (0x80000005/eax):
L1 TLB/cache information: 4K pages & L1 TLB (0x80000005/ebx):
L1 data cache information (0x80000005/ecx):
L1 instruction cache information (0x80000005/edx):
L2 TLB/cache information: 2M/4M pages & L2 TLB (0x80000006/eax):
instruction associativity = L2 off (0)
data associativity = L2 off (0)
L2 TLB/cache information: 4K pages & L2 TLB (0x80000006/ebx):
instruction associativity = L2 off (0)
data associativity = L2 off (0)
L2 unified cache information (0x80000006/ecx):
L3 cache information (0x80000006/edx):
associativity = L2 off (0)
其他命令
lshw
lshw 查看整个计算机的硬件配置。

本文介绍了两种检查TLB(Translation Lookaside Buffer)信息的方法。方法一使用'cpuid'命令结合'grep'过滤TLB相关数据,展示不同类型的TLB如数据TLB、指令TLB和L2 TLB的详细配置。方法二同样利用'cpuid'和'grep',但通过正则表达式筛选L1、L2和L3缓存及TLB的信息。此外,还提到了'lshw'命令用于查看整机硬件配置。

852





