During compilation optimization this question about best guesses for gnu gcc
compiler parameter --param l2-cache-size=
? (default is number for kB block size)
came up.
What are recommendable values for cpu core cluster with shared L2 cache, cpu clusters with united L2 cache on single MMU (memory management unit) and cpu cores with private L2 cache for each single core?
Getting L2 cache sizes¹ on Linux distributions can be done by console commands like:
cat /sys/devices/system/cpu/cpu0/cache/index2/size
(for cpu0 on multicore system, for example)
find /sys/devices/system/cpu/*/cache/index*/size -print -exec cat {} \;
lshw | grep -B 11 -C 11 -e level=2
dmidecode -t cache
lstopo-no-graphics
Is this specific enough for requesting support at gcc mailing list or is there more widespread documentation available for L2 cache related compiler flags?
Thx
1) short summary of How to find the L2 cache size in Linux?
--param l2-cache-size
, btw: additional cores vs. cache sizes and cache misses superuser.com/a/317785/981508