RFR: 8313574: GenShen: Completing a global mark should also complete an old mark [v2]

William Kemper wkemper at openjdk.org
Tue Aug 15 16:13:59 UTC 2023


On Mon, 14 Aug 2023 22:35:46 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> William Kemper has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>> 
>>  - Merge branch 'shenandoah-master' into global-completes-old-mark
>>  - Fix assertions and update comments
>>  - Prepare for mixed collections after global cycle
>>  - Merge branch upstream into global-completes-old-mark
>>  - Have global mark also complete young and old marks
>>    
>>    This will have the remembered set scan use the mark bitmap following a global mark and eliminates the need to coalesce and fill during a global collection.
>
> src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp line 105:
> 
>> 103:       assert(!heap->is_old_gc_active(), "Old GC should not be active during global cycle");
>> 104:     }
>> 105: 
> 
> Is this not true?
> 
> You could rearrange the test into the assertion check though:
> 
> 
>     assert(!_generation->is_global() || !heap->is_old_gc_active, "Old GC should not be active during global cycle");
> 
> (or its de-Morganization, if you prefer).

With this change, if the global cycle degenerates after final mark there could now be regions waiting to be coalesced and filled, so the old gc state is not idle.

> src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 417:
> 
>> 415: //           |   |        |     +-----------------+
>> 416: //           |   |        |     |    WAITING FOR  |
>> 417: //           |   +--------|---> |    EVACUATIONS  |
> 
> This transition has arrows at both ends (IDLE and WAITING FOR EVACUATIONS).

That is intentional, I shall also add an arrow at both ends for IDLE and WAITING FOR FILL. Global cycles do not progress the old generation through marking/bootstrapping so they are allowed to move the old generation from IDLE to one of these states at the end of global mark.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/304#discussion_r1294825052
PR Review Comment: https://git.openjdk.org/shenandoah/pull/304#discussion_r1294828183


More information about the shenandoah-dev mailing list