RFR: Improve scheduling and interleaving of SATB processing in mark loop
Aleksey Shipilev
shade at redhat.com
Mon Jun 18 08:22:35 UTC 2018
On 06/18/2018 09:58 AM, Roman Kennke wrote:
> Printing out when SATB buffers get enqueued (by mutators) and processed
> (by collectors) shows that the way we currently process SATB buffers
> (only when marking stack runs empty) tends to process SATB buffers
> towards the end of marking, thus piling up SATB buffers throughout most
> of the marking cycle.
>
> I propose to also process SATB buffers (if available) between marking
> strides. This leads to more promptly processing SATB buffers, thus
> smoothing out SATB pressure during marking cycle. I also added an
> os::naked_yield() between strides to give mutators a chance to run.
>
> http://cr.openjdk.java.net/~rkennke/interleave-satb/webrev.00/
I think given that SATBMarkQueueSet::apply_closure_to_completed_buffer is locked, we are increasing
the lock contention there. Also, yield() is dodgy in that hot loop. If I interpret the performance
data correctly, conc-traversal is now 10x slower!
So, I think we are better completing our SATB already-marked work first, to cut out the traffic via
SATB queues, and only then approach optimizing the marking loop.
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list