RFR: 8321816: GenShen: Provide a minimum amount of time for an old collection to run
Y. Srinivas Ramakrishna
ysr at openjdk.org
Fri Dec 15 16:35:15 UTC 2023
On Thu, 14 Dec 2023 19:11:34 GMT, William Kemper <wkemper 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.
Looks generally good, but a couple of clarification/documentation requests/questions.
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 between the control points of this loop and the heuristics, and the actual requests to start a cycle look like they could do with a bit of clean up for consistency. At the current time (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.
src/hotspot/share/gc/shenandoah/shenandoahRegulatorThread.hpp line 91:
> 89: bool request_concurrent_gc(ShenandoahGenerationType generation);
> 90:
> 91: bool should_start_young();
Please add a brief line of documentation.
-------------
PR Review: https://git.openjdk.org/shenandoah/pull/371#pullrequestreview-1784487189
PR Review Comment: https://git.openjdk.org/shenandoah/pull/371#discussion_r1428177814
PR Review Comment: https://git.openjdk.org/shenandoah/pull/371#discussion_r1428178613
More information about the shenandoah-dev
mailing list