RFR: Two small changes to generational partial collections...
Aleksey Shipilev
shade at redhat.com
Tue Aug 29 13:35:07 UTC 2017
On 08/29/2017 03:25 PM, Christine Flood wrote:
> Heuristics for partial gc included:
> if (used < prev_used) {
> // Major collection must have happened, "used" data is unreliable,
> wait for update.
> return false;
> }
>
> Except we weren't updating prev_used after full concurrent collections so
> we would have long dry spells with no partial collections.
Hm, set_used_at_last_gc() is called from record_gc_end().
Does that mean we miss record_gc_end on update-refs path? Seems to me
VM_ShenandoahInitUpdateRefs::doit() and VM_ShenandoahFinalUpdateRefs::doit() should have the calls
to record_gc_start / record_gc_end, like other Shenandoah VM_Ops do.
> We were only looking at the desired number of regions when building partial
> collection sets, but because we were rejecting some (in some cases many) we
> were ending up with collection sets that were too small. This allows us to
> keep going until we either run out of regions or reach our desired
> collection set size.
Shouldn't that apply to LRU heuristics too? Your patch seems to only do this for Generational.
Suggestion:
for (uint i = 0; (i < active) && (count < target); i++) {
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list