ppc.h: use correct cacheline size for macOS#22
ppc.h: use correct cacheline size for macOS#22barracuda156 wants to merge 1 commit intourcu:masterfrom
Conversation
|
anyone gonna merge ? |
|
This commit lacks supporting material:
|
|
|
I have prepared a commit that documents further the choice of 256 bytes, see https://review.lttng.org/c/userspace-rcu/+/12210 . Given that this value is exposed in a public header, and used in public data structures, it is part of the liburcu ABI. We cannot change this value without a soname bump. Also, having different values between toolchains would make the executables generated by one toolchain ABI-incompatible with those generated with another. This is not an approach I want to take. I would be open to change the powerpc cache line size value to 128 at the next liburcu soname bump, because POWER5 hardware has been EOL for 15 years now, and POWER 6, 7, 8, 9 CPUs went back to 128 bytes cache lines. So we can keep this in mind for the next soname bump, but I cannot guarantee how soon it will happen. |
|
Note that I've asked around on the linuxppc mailing list and got relevant context: https://lists.ozlabs.org/pipermail/linuxppc-dev/2024-March/thread.html#269930 |
@compudj Thank you for raising the issue. So the consensus appears to be that 128 is the appropriate value? I have found a reference in IBM docs for G5 (PowerPC 970, which is the last one where macOS can run): https://www.redbooks.ibm.com/redpapers/pdfs/redp3890.pdf (page 4). |
|
Yes, I think 128 bytes is appropriate nowadays, considering that only specific hardware had 256 bytes cache lines (POWER5) and has been EOL for a long time. I arrived at the same conclusion for the G5 PowerPC 970: no L3, 128 bytes cache line size for L1 (data+insn) and L2. |
Commit b4e52e3 unconditionally switched to 256 for PowerPC, which is wrong, AFAIK.
Fallback to 128 for Apple case at least.