--- old/src/hotspot/share/runtime/objectMonitor.cpp 2018-09-17 23:27:45.955749321 -0700 +++ new/src/hotspot/share/runtime/objectMonitor.cpp 2018-09-17 23:27:45.747749328 -0700 @@ -127,7 +127,6 @@ static int Knob_ExitPolicy = 0; static int Knob_PreSpin = 10; // 20-100 likely better static int Knob_ResetEvent = 0; -static int BackOffMask = 0; static int Knob_FastHSSEC = 0; static int Knob_MoveNotifyee = 2; // notify() - disposition of notifyee @@ -1873,8 +1872,6 @@ // CONSIDER: use Prefetch::write() to avoid RTS->RTO upgrades // when preparing to LD...CAS _owner, etc and the CAS is likely // to succeed. - int hits = 0; - int msk = 0; int caspty = Knob_CASPenalty; int oxpty = Knob_OXPenalty; int sss = Knob_SpinSetSucc; @@ -1906,29 +1903,6 @@ if (Knob_UsePause & 2) SpinPause(); - // Exponential back-off ... Stay off the bus to reduce coherency traffic. - // This is useful on classic SMP systems, but is of less utility on - // N1-style CMT platforms. - // - // Trade-off: lock acquisition latency vs coherency bandwidth. - // Lock hold times are typically short. A histogram - // of successful spin attempts shows that we usually acquire - // the lock early in the spin. That suggests we want to - // sample _owner frequently in the early phase of the spin, - // but then back-off and sample less frequently as the spin - // progresses. The back-off makes a good citizen on SMP big - // SMP systems. Oversampling _owner can consume excessive - // coherency bandwidth. Relatedly, if we _oversample _owner we - // can inadvertently interfere with the the ST m->owner=null. - // executed by the lock owner. - if (ctr & msk) continue; - ++hits; - if ((hits & 0xF) == 0) { - // The 0xF, above, corresponds to the exponent. - // Consider: (msk+1)|msk - msk = ((msk << 2)|3) & BackOffMask; - } - // Probe _owner with TATAS // If this thread observes the monitor transition or flicker // from locked to unlocked to locked, then the odds that this @@ -2213,9 +2187,7 @@ // The initialization is idempotent, so we don't need locks. // In the future consider doing this via os::init_2(). - if (os::is_MP()) { - BackOffMask = 0; - } else { + if (!os::is_MP()) { Knob_SpinLimit = 0; Knob_SpinBase = 0; Knob_PreSpin = 0;