< prev index next >
src/hotspot/share/runtime/mutex.cpp
Print this page
@@ -368,15 +368,10 @@
if ((Probes & 0x7) == 0) {
Delay = ((Delay << 1)|1) & 0x7FF;
// CONSIDER: Delay += 1 + (Delay/4); Delay &= 0x7FF ;
}
- // Consider checking _owner's schedctl state, if OFFPROC abort spin.
- // If the owner is OFFPROC then it's unlike that the lock will be dropped
- // in a timely fashion, which suggests that spinning would not be fruitful
- // or profitable.
-
// Stall for "Delay" time units - iterations in the current implementation.
// Avoid generating coherency traffic while stalled.
// Possible ways to delay:
// PAUSE, SLEEP, MEMBAR #sync, MEMBAR #halt,
// wr %g0,%asi, gethrtime, rdstick, rdtick, rdtsc, etc. ...
@@ -551,11 +546,10 @@
// Slow-path exit - this thread must ensure succession and progress.
// OnDeck serves as lock to protect cxq and EntryList.
// Only the holder of OnDeck can manipulate EntryList or detach the RATs from cxq.
// Avoid ABA - allow multiple concurrent producers (enqueue via push-CAS)
// but only one concurrent consumer (detacher of RATs).
- // Consider protecting this critical section with schedctl on Solaris.
// Unlike a normal lock, however, the exiting thread "locks" OnDeck,
// picks a successor and marks that thread as OnDeck. That successor
// thread will then clear OnDeck once it eventually acquires the outer lock.
if (!Atomic::replace_if_null((ParkEvent*)_LBIT, &_OnDeck)) {
return;
< prev index next >