RFR: 8365633: Incorrect info is reported on hybrid CPU [v4]

Vladimir Kozlov kvn at openjdk.org
Fri Aug 22 15:16:55 UTC 2025


On Fri, 22 Aug 2025 00:58:26 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:
> 
>   Indicate "(hybrid)" on hybrid CPU

My testing passed.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26808#issuecomment-3214735272


More information about the hotspot-dev mailing list