RFR: 8255716: AArch64: Regression: JVM crashes if manually offline a core

Patrick Zhang qpzhang at openjdk.java.net
Mon Nov 2 13:05:54 UTC 2020


On Mon, 2 Nov 2020 10:08:25 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

> > This assertion is practically not needed. While a test system with some cores intentionally turned off, e.g. via echo 0 > /sys/devices/system/cpu/cpu1/online, java -version would crash, building openjdk on this system would fail too.
> 
> I don't follow this comment. I am not saying the check is redundant but the rationale provided above does not really cut it. Sure, a build might also fail. But that misses several possibilities. The image could be built on a different machine which didn't have the cpu switched off. The cpu switch off could happen on the same machine between building and running. If there is a good reason for not including this check the one cited above is not it.
> 
> Can you just state in simple terms why it is ok to continue when the info retrieved from /proc/cpuinfo and os::processor_count() do not match up?

JVM can work well with the number of enabled cores, which is equivalent to the value of os::processor_count(), e.g. decide the number of threads for parallel gc. While counting the lines from /proc/cpuinfo is a static number.

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

PR: https://git.openjdk.java.net/jdk/pull/983


More information about the hotspot-runtime-dev mailing list