▲ | stinkbeetle 2 days ago | ||||||||||||||||||||||
Cache must be physically organized as 64 byte lines. Cache line size is most important for software for two things: - Architectural interfaces like (I think, I don't really know aarch64) DC CVAU. These don't necessarily have to reflect physical cache organization, cleaning a "line" could clean two physical lines. - Performance. The only thing you really care about is behavior on stores and on load misses for avoiding false sharing cache line bouncing problems. It's possible that either they think 128 byte lines will be helpful for performance and hope they could switch over after legacy software goes away, seeding their mac ecosystem with 128 byte lines now, or that 128 byte line behavior actually does offer some performance benefit and they have a mode that basically gangs two lines together (Pentium 4 had similar IIRC) so it has performance characteristics of a 128 byte line. | |||||||||||||||||||||||
▲ | loeg a day ago | parent [-] | ||||||||||||||||||||||
Early x86 prefetcher would fetch two adjacent cache lines, so despite a 64 byte physical size, in practice adjacent lines would cause false-sharing. This is mostly historical, though it's relatively common to use a 128 byte line size on x86, still. E.g., https://github.com/facebook/folly/blob/main/folly/lang/Align... (Sandy Bridge was a 2011 CPU). (Clang's impl of the std version of these constants uses 64 for both on x86: https://godbolt.org/z/r1fdYTWEn .) | |||||||||||||||||||||||
|