L1 Cache 数据缓存的大小
universe@AI:~$ cat /sys/devices/system/cpu/cpu0/cache/index0/size
32K
universe@AI:~$
L1 Cache 指令缓存的大小
universe@AI:~$ cat /sys/devices/system/cpu/cpu0/cache/index1/size
32K
universe@AI:~$
L2 Cache 的大小
universe@AI:~$ cat /sys/devices/system/cpu/cpu0/cache/index2/size
256K
universe@AI:~$
L3 Cache 的大小
universe@AI:~$ cat /sys/devices/system/cpu/cpu0/cache/index3/size
8192K
universe@AI:~$
Cache Line(缓存块)的大小
CPU Cache 的数据是从内存中读取过来的,它是一块一块读取数据的,而不是按照单个数组元素来读取数据的,这样一块一块的数据,称为 Cache Line(缓存块)。
universe@AI:~$ cat /sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size
64
universe@AI:~$
universe@AI:~$ cat /sys/devices/system/cpu/cpu0/cache/index1/coherency_line_size
64
universe@AI:~$
universe@AI:~$ cat /sys/devices/system/cpu/cpu0/cache/index2/coherency_line_size
64
universe@AI:~$
universe@AI:~$ cat /sys/devices/system/cpu/cpu0/cache/index3/coherency_line_size
64
universe@AI:~$
意味着一次载入数据的大小是 64 字节。