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

Set AssumeMP to true and deprecate the flag

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b31

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: