RFR: 8339611: GenShen: Simplify ShenandoahOldHeuristics::trigger_collection_if_fragmented [v2]
William Kemper
wkemper at openjdk.org
Fri Sep 6 21:31:34 UTC 2024
On Fri, 6 Sep 2024 19:39:44 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 570:
>>
>>> 568: if ((old_span_percent >= 0.50) && (old_density / old_span_percent_squared < 0.75)) {
>>> 569: // We trigger old defragmentation, for example, if:
>>> 570: // old_span_percent is 100% and old_density is below 75.0%, or
>>
>> Note that old_span_percent may be greater than 100%. Can add comment:
>> old_span_percent is 110% and old_density is below 90.8%, or
>>
>> At higher existing utilization, there is less benefit to defragmenting, because there are diminishing returns for the larger efforts. We're just copying nearly full regions around...
>
> But if we are at 110% old_span_percent, we have violated our intended Humongous Reserves, so I'm thinking we should try to squeeze that last 10% out of old so we don't have to STW on the next humongous allocation request...
I have a few broader questions:
* why is `allowed_old_gen_span` defined in terms of humongous reserve?
* why do we want to square `old_span_percent` and divide it into `old_density`? The comments suggest we ought to be comparing `old_density` directly?
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/492#discussion_r1747737832
More information about the shenandoah-dev
mailing list