JDK-8188079 : Set AssumeMP to true and deprecate the flag
  • Type: CSR
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 10
  • Submitted: 2017-09-28
  • Updated: 2017-10-02
  • Resolved: 2017-10-02
Related Reports
CSR :  
Description
Summary
-------

Set the AssumeMP VM flag to true by default, and deprecate it.

Problem
-------

We're now operating in a world where uniprocessors (physical or virtual) are very rare on our supported platforms. Further, we have dynamic environments where we may start of with one processor but acquire more as time goes by. The VM generates different code for uniprocessors and multi-processors, and also has to follow different code paths. This runtime selection happens many times but is pure overhead on the overwhelming majority of systems that are multi-processor. It will be far more efficient to assume all platforms are always multi-processor, but we need to get there in a two step process.

Solution
--------

The AssumeMP flag was added to account for dynamic environments that may start off with only one processor and then acquire more. It is false by default but can be set true in those environments so that correct MP code is always generated/used. The proposal is to switch AssumeMP to default to true, always, and to deprecate it with a view to its obsoletion in a later release - at which point all the code is always MP aware.

Specification
-------------

Set the flag to true:

    diff -r ab3a898fff11 src/hotspot/share/runtime/globals.hpp
    --- a/src/hotspot/share/runtime/globals.hpp
    +++ b/src/hotspot/share/runtime/globals.hpp
    @@ -592,7 +592,7 @@
               range(8, 256)                                                     \
               constraint(ObjectAlignmentInBytesConstraintFunc,AtParse)          \
                                                                                 \
    -  product(bool, AssumeMP, false,                                            \
    +  product(bool, AssumeMP, true,                                             \
               "Instruct the VM to assume multiple processors are available")    \
                                                                                 \
       /* UseMembar is theoretically a temp flag used for memory barrier      */ \

and mark it deprecated:

    diff -r ab3a898fff11 src/hotspot/share/runtime/arguments.cpp
    --- a/src/hotspot/share/runtime/arguments.cpp
    +++ b/src/hotspot/share/runtime/arguments.cpp
    @@ -377,6 +377,7 @@
       // --- Non-alias flags - sorted by obsolete_in then expired_in:
       { "MaxGCMinorPauseMillis",        JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
       { "UseConcMarkSweepGC",           JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
    +  { "AssumeMP",                     JDK_Version::jdk(10),JDK_Version::undefined(), JDK_Version::undefined() },
       { "MonitorInUseLists",            JDK_Version::jdk(10),JDK_Version::undefined(), JDK_Version::undefined() },
       { "MaxRAMFraction",               JDK_Version::jdk(10),  JDK_Version::undefined(), JDK_Version::undefined() },
       { "MinRAMFraction",               JDK_Version::jdk(10),  JDK_Version::undefined(), JDK_Version::undefined() },



Comments
Moving to approved.
02-10-2017