RFR: Expand old on demand [v42]
Kelvin Nilsen
kdnilsen at openjdk.org
Thu May 25 18:30:00 UTC 2023
On Wed, 10 May 2023 23:17:46 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp line 933:
>>
>>> 931: }
>>> 932:
>>> 933: void ShenandoahHeapRegion::set_affiliation(ShenandoahAffiliation new_affiliation, bool defer_affiliated_region_count_updates) {
>>
>> Let's think about whether we need this defer_affiliated_region_count_updates variable.
>>
>> (would be cleaner to not have this)
>
> It may be the reason that if we change the affiliations asynchronousnly during eva, then we have to change the generation capacities as well.
>
> During allocations, we ask how much is available in young and/or old, and if we add or remove regions from either generation without adjust capacities, available will be wrong.
We have refactored this code so that we no longer need the defer_affiliated_region_count_updates argument. It has been removed.
>> src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp line 1073:
>>
>>> 1071: heap->card_scan()->reset_object_range(bottom(), end());
>>> 1072: heap->card_scan()->mark_range_as_dirty(bottom(), top() - bottom());
>>> 1073:
>>
>> We could defer this c&f until we start the next old cycle. The only problem is that when we do the next marking cycle, it only c&fs the regions that were in the mixed-evac candidate set. (so an alternative approach would be to tally these up).
>
> Would be better to use an existing coalesce and fill function rather than repeating the code here.
I've placed a TODO comment to replace this code with an existing coalesce-and-fill function.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/248#discussion_r1205873779
PR Review Comment: https://git.openjdk.org/shenandoah/pull/248#discussion_r1205872835
More information about the shenandoah-dev
mailing list