RFR: Abandon mixed collections if all candidates are pinned [v3]

Y. Srinivas Ramakrishna ysr at openjdk.org
Fri Mar 31 02:25:07 UTC 2023


On Thu, 30 Mar 2023 21:48:47 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> A new `WAITING_FOR_FILL` state has been added to the old generation. This state is now entered when all the candidates for a mixed collection cycle are found to be pinned (which should be quite rare). This state permits a new old generation collection cycle to begin (which itself begins with making these regions parseable).
>> 
>> This change also adds a new diagnostic flag `ShenandoahCoalesceChance` which is the probability (expressed as a percentage) of abandoning all the candidates of a mixed collection. Any abandoned candidate regions will be made parseable.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Abandon mixed collection candidates after they've been made parseable

LGTM!

src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 118:

> 116:     _old_generation->transition_to(ShenandoahOldGeneration::IDLE);
> 117:   } else if (included_old_regions == 0) {
> 118:     // We have candidates, but none were included for evacuation - are they all be pinned?

are they all pinned?  

(no be)

src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 260:

> 258:   // This code will see the same set of regions to filled on each resumption as it did
> 259:   // on the initial run. That's okay because each region keeps track of its own coalesce
> 260:   // and fill state. Region that were filled on a prior attempt will not try to fill again.

Regions

src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 391:

> 389: //
> 390: bool ShenandoahOldGeneration::validate_transition(State new_state) {
> 391:   ShenandoahHeap* heap = ShenandoahHeap::heap();

Could you update the ascii art of the sate transition diagram to include WAITING_FOR* states instead of the old WAITING state?

-------------

Marked as reviewed by ysr (Author).

PR Review: https://git.openjdk.org/shenandoah/pull/236#pullrequestreview-1366156669
PR Review Comment: https://git.openjdk.org/shenandoah/pull/236#discussion_r1153946691
PR Review Comment: https://git.openjdk.org/shenandoah/pull/236#discussion_r1153946452
PR Review Comment: https://git.openjdk.org/shenandoah/pull/236#discussion_r1153947896


More information about the shenandoah-dev mailing list