RFR: 8324649: Shenandoah: refactor implementation of free set [v6]

Kelvin Nilsen kdnilsen at openjdk.org
Sat Feb 3 14:07:03 UTC 2024


On Sat, 3 Feb 2024 08:47:48 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename and comments for _capacity_of and _used_by
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 155:
> 
>> 153: // Remove this region from its free partition, but leave its capacity and used as part of the original free partition's totals.
>> 154: // When retiring a region, add any remnant of available memory within the region to the used total for the original free partition.
>> 155: void ShenandoahRegionPartition::retire_within_partition(size_t idx, size_t used_bytes) {
> 
> Why is the method called `retire_within_partition()` instead of `retire_from_partition()` ?
> 
> (i.e. why _within_ partition, since it's leaving its free partition?)

It's a little subtle.  Maybe it needs more documentation.  We retire the region so it no longer is within the range searched when new allocations are made.  However, its totals (capacity and used) are still counted toward the Mutator or Collector partition's total.

We've probably created some of our own pain by calling this a partition instead of a "free set".  Advice?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1477070065


More information about the shenandoah-dev mailing list