RFR: 8365633: Incorrect info is reported on hybrid CPU [v2]
David Holmes
dholmes at openjdk.org
Mon Aug 18 07:08:11 UTC 2025
On Sun, 17 Aug 2025 09:09:44 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
>> `VM.info` DCmd reports CPU information. I ran this on Intel Core Ultra 5 225U , then I got following result:
>>
>>
>> CPU: total 14 (initial active 14) (7 cores per cpu, 2 threads per core) family 6 model 181 stepping 0 microcode 0xffffffff, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, clwb, hv, serialize, rdtscp, rdpid, fsrm, gfni, f16c, cet_ibt, cet_ss
>> CPU Model and flags from /proc/cpuinfo:
>> model name : Intel(R) Core(TM) Ultra 5 225U
>> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq monitor est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave osxsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni umip gfni vaes vpclmulqdq rdpid ibrs ibpb stibp ssbd
>>
>>
>> It reports "7 cores per cpu, 2 threads per core". 225U has hybrid architecture - 2 P cores, 8 E cores, 2 LP cores, and also P core has 2 threads per core. Then it should be "12 cores, 14 threads".
>> https://www.intel.com/content/www/us/en/products/sku/241861/intel-core-ultra-5-processor-225u-12m-cache-up-to-4-80-ghz/specifications.html
>>
>> According to Intel Software Developer's Manual, it seems to be difficult to get number of physical cores. In Linux kernel, it seems to be calculated by complex logic: https://github.com/torvalds/linux/blob/v6.16/arch/x86/kernel/smpboot.c#L567-L597
>> In addition, all of P cores might not be enabled HT. Thus to show only number of threads is reasonable at this point.
>
> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>
> Add HYBRID to CPUFeature in JVMCI
These hybrid CPUs are a nightmare to understand/describe/use. How does "logical cpus" map to what we return from `active_processor_count`? i.e. what does the DCmd show after your change?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26808#issuecomment-3195387030
More information about the hotspot-dev
mailing list