RFR: Concurrent preclean
Roman Kennke
rkennke at redhat.com
Wed May 31 11:59:34 UTC 2017
Am 31.05.2017 um 13:48 schrieb Aleksey Shipilev:
> Hi,
>
> Lots of weak references is hard. Processing them during the pause is also hard.
> For some applications I've tried, the pause is very long. While studying
> reference processing code I realized we can do something that CMS already does
> -- concurrently precleaning before diving into STW.
>
> See:
> http://cr.openjdk.java.net/~shade/shenandoah/preclean/webrev.01/
>
> For example, retaining a 10M WeakHashMap, before/after:
> http://cr.openjdk.java.net/~shade/shenandoah/preclean/before.txt
> http://cr.openjdk.java.net/~shade/shenandoah/preclean/after.txt
>
> So the positive thing is that it moves a substantial part of pause to concurrent
> mode. The downside is that it is in the middle between concmark and final mark,
> which may accumulate more cruft in SATBs. But, with small reference count, the
> new phase takes just a bit of time, and with lots of references, we still have
> the net win. We can consider draining SATB during preclean later.
>
> Testing: hotspot_gc_shenandoah, jcstress -m quick
>
> -Aleksey
>
Sounds good.
- what's that commented part in referenceProcessor.cpp ?
- is precleaning single-threaded? if yes, can it be made multithreaded?
- isn't experimental flag defaulting to true pointless? shouldn't it be
diagnostic-> default true, experimental -> default false? (not very
important to me...)
Roman
More information about the shenandoah-dev
mailing list