RFR: 8255799: AArch64: CPU_A53MAC feature may be set incorrectly
John Paul Adrian Glaubitz
glaubitz at openjdk.java.net
Wed Nov 4 12:16:56 UTC 2020
On Tue, 3 Nov 2020 23:05:58 GMT, Bernhard Urban-Forster <burban at openjdk.org> wrote:
>> JDK-8255716 (#983) uncovered that os::processor_count on Linux can be not equal to number of cores reported in /proc/cpuinfo. The latter historically was used to decide CPU_A53MAC feature. This patch restores feature detection based on /proc/cpuinfo.
>>
>> Testing: linux -version
>> Unfortunately I cannot test windows/aarch64, CC: @lewurm @luhenry
>
> Tested slowdebug build on Windows+Arm64 with this patch, and smoked tested it with `jtreg:tier1_compiler_1` successfully.
>
> Change itself looks go to me too (but I'm not a reviewer).
Does this account for the fact that CPU cores can be offline?
Normally, the number of available cores is determined with ```sysconf()``` in a portable manner and ```sysconf()``` differentiates between _configured_ and _online_ processors:
- _SC_NPROCESSORS_CONF
The number of processors configured. See also get_nprocs_conf(3).
- _SC_NPROCESSORS_ONLN
The number of processors currently online (available). See also get_nprocs_conf(3).
The number of online processors can be lower than the number of configured processors.
I remember fixing an issue regarding this feature in PulseAudio as the testsuite broke on SPARC on Linux, see: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/1df21e6ab6cd42e2f7601a6c5577c20b7e3d1046
-------------
PR: https://git.openjdk.java.net/jdk/pull/1039
More information about the hotspot-dev
mailing list