RFR: 8323630: GenShen: Control thread may (still) ignore requests to start concurrent GC

Kelvin Nilsen kdnilsen at openjdk.org
Fri Jan 12 14:04:11 UTC 2024


On Fri, 12 Jan 2024 02:15:20 GMT, Y. Srinivas Ramakrishna <ysr 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.
>
> src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp line 388:
> 
>> 386:     }
>> 387: 
>> 388:     // Don't wait if there was an allocation failure or another request was made mid-cycle.
> 
> I'd rewrite the comment as "Wait for ShenandoahControlIntervalMax, unless there was an allocation failure or ..."

Agree that Ramki suggestion reads clearer.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/382#discussion_r1450482719


More information about the shenandoah-dev mailing list