RFR: 8311843: GenShen: assertion failed "Old generation affiliated regions must be less than capacity" [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Aug 25 23:37:44 UTC 2023
On Fri, 25 Aug 2023 23:08:12 GMT, Kelvin Nilsen <kdnilsen 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 remote-tracking branch 'shenandoah/master' into full-gc-max-capacity
>> - Do not prematurely exit when reserving regions
>> - 8314610: hotspot can't compile with the latest of gtest because of <iomanip>
>>
>> Reviewed-by: jiefu, stuefe
>> - Force transfer of old regions to old generation capacity after full GC
>> - Remove vestigial member and methods
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1013:
>
>> 1011: _free_sets.move_to_set(idx, OldCollector, region_capacity);
>> 1012: _free_sets.assert_bounds();
>> 1013:
>
> IIUC, the new code will fail to transfer if the transfer makes YOUNG smaller than min_capacity or makes OLD larger than max_capacity. It will never fail because unaffiliated_regions < 1.
>
> I have two concerns with the code as written:
> 1. I don't think we should flip the region if we don't flip the capacity. That will create future assertion failures.
> 2. If we fail to flip_to_old(), we need to return a status code to so indicate. The caller needs to know that the requested flip cannot be achieved and thus the precipitating "allocation request" must fail.
>
> Alternatively, we could adopt the convention that min/max generation sizes are "preferences" but are not absolutely enforced. Maybe it is better to bend the rules to allow pause-free operation rather than forcing an old evacuation failure that would require a Full GC.
If we adopt this convention, we should get rid of any asserts that endeavor to enforce max/min generation capacities (or change these to enforce that capacity never shrinks below 0 and never grows above heap->capacity())
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/311#discussion_r1306212389
More information about the shenandoah-dev
mailing list