RFR: 8373714: Shenandoah: Register heuristic penalties following a degenerated GC [v2]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Tue Dec 16 23:33:40 UTC 2025
On Tue, 16 Dec 2025 18:27:25 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> refactor for reviewer requests
>
> src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp line 321:
>
>> 319: op_degenerated_futile();
>> 320: } else {
>> 321: _generation->heuristics()->record_unsuccessful_degenerated();
>
> Suggestion:
>
> _generation->heuristics()->record_successful_degenerated();
>
> I think the confusion here is that we are conflating `progress` and `success`. The "progress" notion here is about triggering a full GC or giving up entirely. The degenerated cycle is "successful" because it did not run a full GC. Maybe we should rename `record_successful_degenerated` to `record_degenerated` (or, perhaps even `apply_degenerated_penalty`). I was about to suggest we pull `record_success_degenerated` out of the logic entirely, but that would mean upgraded degen cycles would be penalized again when the full GC completes.
May be let the heuristics (or the policy) track progress as well, and inform the actuator (i.e. op degenerated) whether it should upgrade to a full gc. It almost feels like heuristics and policy and actuator are leaking abstractions. It feels like heuristics keep track of the model parameters and learn from sensors, and the policy consults a specific heuristic to inform actuator (i.e. actions).
By that model, you'd have the actuator sending the sensor information to the heuristics and asking the policy (or the heuristics, if you conflate heuristics and policy) to decide which step to take next. It would seem that evaluation of the notion of progress then moves to the policy too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28834#discussion_r2625082943
More information about the hotspot-gc-dev
mailing list