bios 通过pptt table将cache信息告诉os因此可以通过查询sys文件系统来查询cacheline的大小.
linux-28ef:~ # cat /sys/devices/system/cpu/cpu1/cache/index0/type
Data
linux-28ef:~ # cat /sys/devices/system/cpu/cpu1/cache/index0/coherency_line_size
64
linux-28ef:~ # cat /sys/devices/system/cpu/cpu1/cache/index1/type
Instruction
linux-28ef:~ # cat /sys/devices/system/cpu/cpu1/cache/index1/coherency_line_size
64
linux-28ef:~ # cat /sys/devices/system/cpu/cpu1/cache/index2/type
Unified
linux-28ef:~ # cat /sys/devices/system/cpu/cpu1/cache/index2/coherency_line_size
64
linux-28ef:~ # cat /sys/devices/system/cpu/cpu1/cache/index3/type
Unified
linux-28ef:~ # cat /sys/devices/system/cpu/cpu1/cache/index3/coherency_line_size
128