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

Kelvin Nilsen kdnilsen at openjdk.org
Wed Feb 7 18:33:11 UTC 2024


On Thu, 1 Feb 2024 05:20:56 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.hpp line 36:
> 
>> 34: enum ShenandoahFreeSetPartitionId : uint8_t {
>> 35:   NotFree,                      // Region has been retired and is not in any free set: there is no available memory.
>> 36:   Mutator,                      // Region is in the Mutator free set: available memory is available to mutators.
> 
> Just want to make sure: "available to mutators" -- is this both for object allocation as well as for possible evacuation as part of the mutator LRB?

For personal clarification: when the mutator LRB needs to evacuate an object, it uses the collector set.  Each mutator has three TLABS: one for mutator allocations, one for young-gen evacuations, and one for old-gen evacuations.  Let me know if you think we need more documentation around this.

> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 37:
> 
>> 35:   NotFree,                      // Region has been retired and is not in any free set: there is no available memory.
>> 36:   Mutator,                      // Region is in the Mutator free set: available memory is available to mutators.
>> 37:   Collector,                    // Region is in the Collector free set: available memory is reserved for evacuations.
> 
> When mutators evacuate the target of an LRB, do they use `Mutator` or `Collector`. I assume the former? In that case, I'd say for Collector: `available memory is reserved for collector threads for evacuation`.

actually, the collector reserve is for all evacuation, whether performed by collector worker threads or by mutator threads doing LRB handling.

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

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


More information about the shenandoah-dev mailing list