Reproduced from: http://blog.csdn.net/zhuliting/article/details/6744090
Because the paper requires CPU cache-related information, but the Intel official website http://ark.intel.com/#desktopprocessors只能查到L2 cache size. Then from the network to find the Linux system to view the cache size of the two methods.
The first method is to find from the boot information:
[Plain] View plain copy print? [root@c0106 papi]# dmesg |grep cache dentry cache hash table entries: 524288 (order: 10, 4194304 bytes) Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes) Mount-cache hash table entries: 256 CPU: L1 I CACHE: 32K, L1 D cache: 32K cpu: l2 cache: 4096k Cpu: l1 i cache: 32K, L1 D cache: 32K cpu: l2 cache: 4096k cpu: l1 i cache: 32k, l1 d cache: 32k CPU: L2 cache: 4096K Cpu: l1 i cache: 32k, l1 d cache : 32k cpu: l2 cache: 4096k ip route cache hash table entries: 131072 (order: 8, 1048576 bytes) Dquot-cache hash table entries: 512 (order 0, 4096 bytes) PCI: cache line size of 32 is not supported by device 0000:00:1d.7 scsi device sda: drive cache: write back SCSI device sda: drive cache: write back Sdb: assuming drive cache: write through sdb: assuming drive cache: write through sdc: assuming drive cache: write through sdc: assuming drive cache: write through
The second method:
[Plain]View Plain copy print? [root@c0106 papi]# ls/sys/devices/system/cpu/cpu cpu0/cpu1/cpu2/cpu3/
This machine is a child node of 1800, dual core, enable Hyper-Threading technology, so this shows four CPUs.
[Plain]View Plain copy print? [root@c0106 papi]# ls/sys/devices/system/cpu/cpu0/cache/index0 index1 index2 [root@c0106 papi]# cat/sys/devices/ System/cpu/cpu0/cache/index0/level 1 [root@c0106 papi]# cat/sys/devices/system/cpu/cpu0/cache/index0/type Data [root@c0106 papi]# cat/sys/devices/system/cpu/cpu0/cache/index0/size 32K
As you can see from the above, the information shown here is for the first-level data cache. Information on level Two cache is in the Ndex1 index2 directory