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

Kelvin Nilsen kdnilsen at openjdk.org
Sat Feb 3 16:52:03 UTC 2024


On Sat, 3 Feb 2024 08:49:52 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 550:
> 
>> 548:     // allocate within.  This was observed to result in large amounts of available memory being ignored
>> 549:     // following a failed shared allocation request.  TLAB requests will generally downsize to absorb all
>> 550:     // memory available within the region even if this is less than the desired size.
> 
> I don't understand this comment, since you are it seems to me retiring the region below at line 553. (Also see comment elsewhere on calling the method `retire_within_partition`, instead of the more natural (to me) `retire_from_partition`.

I'm fixing this comment to make more clear.  In the current implementation, we only retire a region if the remaining capacity is less than PLAB::min_size().  The previous implementation was observed to retire some regions even when there was 50% of the region still available (in the case that a very large shared alloc failed).

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

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


More information about the shenandoah-dev mailing list