问题
On Intel processors
Linux linux-epq2.site 3.7.10-1.11-desktop #1 SMP PREEMPT Thu May 16 20:27:27 UTC 2013 (adf31bb) x86_64 x86_64 x86_64 GNU/Linux
to fetch the cache details:
cat /sys/devices/system/cpu/cpu*/cache/index*/
Where * is the respective cpu and cache index numbers
However, on ARM processors, this file/folder is not available. Is there a way to fetch these details?
Linux arndale 3.9.0-rc5+ #8 SMP Tue Apr 9 12:40:32 CEST 2013 armv7l GNU/Linux
回答1:
From ARMv8A (64bit), it is possible to get cache info from CLIDR register. So cache info can be populated to /sys file system in Linux. Check detail from kernel/arch/arm64/kernel/cacheinfo.c.
来源:https://stackoverflow.com/questions/17170755/getting-cache-details-in-arm-processors-linux