RFR: 8321816: GenShen: Provide a minimum amount of time for an old collection to run

William Kemper wkemper at openjdk.org
Fri Dec 15 19:29:11 UTC 2023


On Fri, 15 Dec 2023 16:29:26 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Young collections are allowed to interrupt old collections. Under heavy load, this may result in starvation of old collections - which may in turn lead to even more memory pressure on the young generation. Adding a minimum guaranteed amount of time for the old gc to make progress will help avoid this situation.
>
> src/hotspot/share/gc/shenandoah/shenandoahRegulatorThread.cpp line 79:
> 
>> 77:         }
>> 78:       } else {
>> 79:         if (should_start_young()) {
> 
> 1. Could you explain (and document) why we don't do the same check `should_start_young` also at line 88 further below, _then_ `start_young_cycle`, where we find the control thread in the mode `servicing_old`?
> 2. The split of the roles of checks (`should_start_..`)  between here and the heuristics, and the actual requests/actions (`start_..` or `request_`) to start a cycle look like they could do with a bit of clean up for consistency & uniformity. At the current time (although not as a result of your current change), the checks and the actions are scattered over a few routines so that reasoning about their correctness (or their behaviour) can be a bit challenging. This latter clean-up can, however, wait for the future.

Good catch. I published this PR prematurely.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/371#discussion_r1428395269


More information about the shenandoah-dev mailing list