RFR: 8365673: Incorrect number of cores are reported on Ryzen CPU
David Holmes
dholmes at openjdk.org
Thu Aug 21 03:04:49 UTC 2025
On Mon, 18 Aug 2025 10:01:46 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
> According to [Programmer's Manual by AMD](https://docs.amd.com/v/u/en-US/40332-PUB_4.08), Bit 7:0 in ECX from CPUID leaf 80000008h means number of threads, not cores. Thus we should divide it by threads per core.
That appears to be a documentation errata that was fixed in June 2023 i.e it used to say "cores" (hence the NC name) but now it says "physical threads". I'm not sure the meaning actually changed based on the chip family (`if (cpu_family() >= 0x17) `) but rather should always be interpreted as number-of-threads no matter which chip you have. Unfortunately I/we have no way to test this across a range of AMD chips!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26819#issuecomment-3208834587
More information about the hotspot-dev
mailing list