RFR: 8327000: GenShen: Integrate updated Shenandoah implementation of FreeSet into GenShen [v8]

Y. Srinivas Ramakrishna ysr at openjdk.org
Wed Jun 19 01:50:25 UTC 2024


On Thu, 13 Jun 2024 22:22:01 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> The mainline implementation of ShenandoahFreeSet was recently updated.  This PR integrates the upstream changes
>> into Generational Shenandoah.
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Minor refinements to test programs
>   
>   TestAllocIntArrays: comments to explain behavior.
>   TestOldGrowthTriggers: reduce the number of loop iterations so this test
>   will not time out on less powerful test platforms.

src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 418:

> 416:   // old collector partition to assure that old collector partition has at least old_reserve.  Update old_region_count
> 417:   // to represent the total number of regions in the old generation by adding the number of regions moved from the
> 418:   // mutator partition to the old collector partition.

How about:


Ensure that Collector has at least `to_reserve` regions, and OldCollector has at
least `old_reserve` regions.
Upon return `old_region_count` holds the number of regions in OldCollector.


This makes me wonder about the asymmetry of the return value. Also could it be a plain return value from the method rather than var parameter to the method?

src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 423:

> 421: 
> 422: 
> 423:   void reserve_regions(size_t young_reserve, size_t old_reserve);

Is the old variant without the var parameter still used somewhere?

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/440#discussion_r1645283876
PR Review Comment: https://git.openjdk.org/shenandoah/pull/440#discussion_r1645285901


More information about the shenandoah-dev mailing list