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

Kelvin Nilsen kdnilsen at openjdk.org
Sat Feb 3 14:33:06 UTC 2024


On Sat, 3 Feb 2024 14:04:53 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> 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?

I'll change the name, as you suggest.

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

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


More information about the hotspot-gc-dev mailing list