Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8185062

Set AssumeMP to true and deprecate the flag

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 10
    • 10
    • hotspot
    • None
    • b31

      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.

            dholmes David Holmes
            eosterlund Erik Ă–sterlund
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: