RFR: 8338440: Parallel: Improve fragmentation mitigation in Full GC [v2]

Albert Mingkun Yang ayang at openjdk.org
Fri Aug 23 11:28:03 UTC 2024


On Fri, 23 Aug 2024 10:57:30 GMT, Guoxiong Li <gli at openjdk.org> wrote:

>> I tried to make fields of `class SplitInfo` to match their counterpart in `class RegionData`, except the additional `_split_` prefix, in order to signify these fields are closely related.
>> 
>>> But in _split_destination_count, the prefix split means two parts whose destinations locate in different regions but in the same space.
>> 
>> Why are they in the "same" space? The purpose of having "split" to support space-boundary so that the first part and the second part are in two spaces.
>
>> > But in _split_destination_count, the prefix split means two parts whose destinations locate in different regions but in the same space.
>> 
>> Why are they in the "same" space? The purpose of having "split" to support space-boundary so that the first part and the second part are in two spaces.
> 
> The `_split_destination_count` is a size to record how many regions the preceding part occupy. The preceding part is moved to one same space and the second part is moved to another space. So now, it seems you are also misled by this ambiguous name, which is a proof that we need to rename it.
> 
> 
> // file psParallelCompact.hpp
> 
>   // Number of regions the preceding live words are relocated into.
>   uint split_destination_count() const { return _split_destination_count; }
> 
> 
> // file psParallelCompact.cpp, method SplitInfo::record
> 
>   // How many regions does the preceding part occupy
>   uint split_destination_count;
>   if (preceding_live_words == 0) {
>     split_destination_count = 0;
>   } else {
>     if (split_destination + preceding_live_words > sd.region_align_up(split_destination)) {
>       split_destination_count = 2;
>     } else {
>       split_destination_count = 1;
>     }
>   }

Since the preceding live words can be relocated to more than one region, I believe you interpret that as "split". However, the word "split" in this class/context is exclusively reserved for "splitting" a region so that "The preceding part is moved to one same space and the second part is moved to another space."

Relocating into multiple destination-regions is not "split", otherwise, `RegionData::_destination` should contain "split" as well.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20590#discussion_r1728818747


More information about the hotspot-gc-dev mailing list