RFR: 8323630: GenShen: Control thread may (still) ignore requests to start concurrent GC
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Jan 12 14:04:07 UTC 2024
On Fri, 12 Jan 2024 00:24:36 GMT, William Kemper <wkemper at openjdk.org> wrote:
> A race condition exists in which the control thread may clear the `_requested_gc_cause` immediately after a mutator requests an explicit gc. When this happens, the control thread will no longer accept requests from the regulator to start concurrent GC cycles. The mutator thread will never wakeup, eventually the application will run out of memory or no progress will be made.
>
> The change here is intended to simplify the thread communication protocol by reducing the number of variables in play.
Marked as reviewed by kdnilsen (Committer).
src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp line 933:
> 931: size_t required_gc_id = current_gc_id + 1;
> 932: while (current_gc_id < required_gc_id) {
> 933: // Although setting gc request is under _gc_waiters_lock, but read side (run_service())
While we're in here, can we remove "Although" from this comment.
-------------
PR Review: https://git.openjdk.org/shenandoah/pull/382#pullrequestreview-1818313425
PR Review Comment: https://git.openjdk.org/shenandoah/pull/382#discussion_r1450488612
More information about the shenandoah-dev
mailing list