RFR: 8237143: Eliminate DirtyCardQ_cbl_mon

Kim Barrett kim.barrett at oracle.com
Thu Jan 16 08:51:17 UTC 2020

Please review this change to eliminate the DirtyCardQ_cbl_mon.  This
is one of the two remaining super-special "access" ranked mutexes.
(The other is the Shared_DirtyCardQ_lock, whose elimination is covered
by JDK-8221360.)

There are three main parts to this change.

(1) Replace the under-a-lock FIFO queue in G1DirtyCardQueueSet with a
lock-free FIFO queue.

(2) Replace the use of a HotSpot monitor for signaling activation of
concurrent refinement threads with a semaphore-based solution.

(3) Handle pausing of buffer refinement in the middle of a buffer in
order to handle a pending safepoint request.  This can no longer just
push the partially processed buffer back onto the queue, due to ABA
problems now that the buffer is lock-free.



mach5 tier1-5
Normal performance testing showed no significant change.
specjbb2015 on a very big machine showed a 3.5% average critical-jOPS
improvement, though not statistically significant; removing contention
for that lock by many hardware threads may be a little bit noticeable.

More information about the hotspot-gc-dev mailing list