RFR: 8324649: Shenandoah: refactor implementation of free set [v6]
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Feb 2 23:43:05 UTC 2024
On Thu, 1 Feb 2024 02:19:17 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 54:
>>
>>> 52:
>>> 53: // For each type, we track an interval outside of which a region affiliated with that partition is guaranteed
>>> 54: // not to be found. This makes searches for free space more efficient. For each partition p, _leftmosts[p]
>>
>> I am being a bit pedantic here.
>> Partition is usually identified with the _set of equivalence classes_. Thus a partition is an equivalence relation, and each equivalence class in the partition has, in this case, a distinct partition id (i.e. each region is either in the Mutator equivalence class aka Mutator free set, the Collector equivalence class aka Collector free set, or the NotFree equivalence class aka NotFree set). In your terminology, each equivalence class is a "free set".
>
> However, upon reading further, I see that you have used "partition" not in the mathematical sense of an equivalence relation on a set, but in the English language sense as a subset of a set. In that case, you can continue to use the terminology you are using, but I'd change the class `ShenandoahRegionPartition` to the plural `ShenandoahRegionPartitions`, since you think of it as the combination of 3 partitions (in the English language sense): a Mutator partition, a Collector partition, and a NotFree partition. Or you could call it `ShenandoahRegionPartitioning`. Indeed, in your comment above, you say "This class represents a partitioning of ...".
I'll go with ShenandoahRegionPartitions. Thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1476874936
More information about the hotspot-gc-dev
mailing list