Since is_MP() was introduced, the world has moved on in ways that makes its existence questionable.
First of all, most systems are indeed MP. Systems that return false are typically either very old or virtualized. Old systems we arguably do not care about so much, and as for virtualized systems it is a bug to assume is_MP can be set statically when initializing the VM.
Now the problem with virtualized environments that have become increasingly popular is that they are more dynamic. If you run Java in a docker container for example, it might be that the container starts with one CPU, only to have it bumped later on with docker update --cpus, dynamically giving the container more threads. However, since we already decided during initialization that is_MP could be set to false, synchronization code was elided, and the VM will crash.
Therefore, I propose that we turn is_MP on permanently, to prevent containers from crashing when dynamically resized. An alternative if we really want to insist on providing a non-MP runtime is to change AssumeMP to be true by default, and allow it to be explicitly turned off. I do not mind as long as the default setting is safety-first w.r.t. assuming the system is MP or not.
First of all, most systems are indeed MP. Systems that return false are typically either very old or virtualized. Old systems we arguably do not care about so much, and as for virtualized systems it is a bug to assume is_MP can be set statically when initializing the VM.
Now the problem with virtualized environments that have become increasingly popular is that they are more dynamic. If you run Java in a docker container for example, it might be that the container starts with one CPU, only to have it bumped later on with docker update --cpus, dynamically giving the container more threads. However, since we already decided during initialization that is_MP could be set to false, synchronization code was elided, and the VM will crash.
Therefore, I propose that we turn is_MP on permanently, to prevent containers from crashing when dynamically resized. An alternative if we really want to insist on providing a non-MP runtime is to change AssumeMP to be true by default, and allow it to be explicitly turned off. I do not mind as long as the default setting is safety-first w.r.t. assuming the system is MP or not.
- csr for
-
JDK-8188079 Set AssumeMP to true and deprecate the flag
- Closed
- relates to
-
JDK-8188764 Obsolete AssumeMP and then remove all support for non-MP builds
- Resolved
-
JDK-8185572 Enable AssumeMP by default on SPARC machines
- Resolved