3 ms·
It looks like sysctl shows the cache info for the little cores, at least by default: hw.cachelinesize: 128 hw.l1icachesize: 131072 hw.l1dcachesize: 65536
by 38491239821398 6y ago
It looks like sysctl shows the cache info for the little cores, at least by default:
hw.cachelinesize: 128
hw.l1icachesize: 131072
hw.l1dcachesize: 65536
The reported L1I and L1D matches up with the little cores.
Also very interesting: if you run sysctl under Rosetta, it reports 64 bytes:
% arch -x86_64 /bin/bash -c "sysctl hw.cachelinesize"
hw.cachelinesize: 64
This information is exposed specifically so that app developers can optimize for the cache line size in use. I very much doubt Apple would report a false number.
As for Samsung: my guess is that Apple has been using 128-byte cache lines for a long time, and Samsung simply copied that because Apple did it, without understanding the implications. That would be totally in line with what I expect from them.
- zeusk 6y ago> This information is exposed specifically so that app developers can optimize for the cache line size in use. I very much doubt Apple would report a false number. No, this number is used for compatibility reasons. OS is free to pull shenanigan behind apps to take care of CPU cache line size changing underneath them (like using a larger size so it'll align on everything; 128b aligned is 64b aligned too).