RFR: 8349094: GenShen: Race between control and regulator threads may violate assertions [v12]
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Feb 14 19:41:16 UTC 2025
On Fri, 14 Feb 2025 17:43:48 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> There are several changes to the operation of Shenandoah's control threads here.
>> * The reason for cancellation is now recorded in `ShenandoahHeap::_cancelled_gc` as a `GCCause`, instead of various member variables in the control thread.
>> * The cancellation handling is driven entirely by the cancellation cause
>> * The graceful shutdown, alloc failure, humongous alloc failure and preemption requested flags are all removed
>> * The shutdown sequence is simpler
>> * The generational control thread uses a lock to coordinate updates to the requested cause and generation
>> * APIs have been simplified to avoid converting between the generation `type` and the actual generation instance
>> * The old heuristic, rather than the control thread itself, is now responsible for resuming old generation cycles
>> * The control thread doesn't loop on its own (unless the pacer is enabled).
>>
>> ## Testing
>> * jtreg hotspot_gc_shenandoah
>> * dacapo, extremem, diluvian, specjbb2015, specjvm2018, heapothesys
>
> William Kemper has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 30 commits:
>
> - Merge remote-tracking branch 'jdk/master' into fix-control-regulator-threads
> - Old gen bootstrap cycle must make it to init mark
> - Merge remote-tracking branch 'jdk/master' into fix-control-regulator-threads
> - Improve message for assertion
> - Make shutdown safer for threads requesting (or expecting) gc
> - Do not accept requests if control thread is terminating
> - Notify waiters when control thread terminates
> - Add event for control thread state changes
> - Fix shutdown livelock error
> - Fix includes
> - ... and 20 more: https://git.openjdk.org/jdk/compare/ba6c9659...915ffbda
Thank you. This looks very clean to me.
src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp line 98:
> 96: }
> 97:
> 98: // In case any threads are waiting for a cycle to happen, let them know it isn't.
maybe "it isn't happening", or "it won't happen".
-------------
Marked as reviewed by kdnilsen (Author).
PR Review: https://git.openjdk.org/jdk/pull/23475#pullrequestreview-2618641262
PR Review Comment: https://git.openjdk.org/jdk/pull/23475#discussion_r1956626274
More information about the shenandoah-dev
mailing list