RFR: 8349094: GenShen: Race between control and regulator threads may violate assertions [v18]

William Kemper wkemper at openjdk.org
Fri Feb 28 17:17:17 UTC 2025


> 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 37 commits:

 - Merge remote-tracking branch 'jdk/master' into fix-control-regulator-threads
 - Don't check for shutdown in control thread loop condition
   
   It may cause the thread to exit before it is requested to stop
 - Add assertions about old gen state when resuming old cycles
 - Remove duplicated field pointer for old generation
 - Improve names and comments
 - Merge tag 'jdk-25+11' into fix-control-regulator-threads
   
   Added tag jdk-25+11 for changeset 0131c1bf
 - Address review feedback (better comments, better names)
 - 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
 - ... and 27 more: https://git.openjdk.org/jdk/compare/e98df71d...37e445d6

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

Changes: https://git.openjdk.org/jdk/pull/23475/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23475&range=17
  Stats: 963 lines in 18 files changed: 327 ins; 294 del; 342 mod
  Patch: https://git.openjdk.org/jdk/pull/23475.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23475/head:pull/23475

PR: https://git.openjdk.org/jdk/pull/23475


More information about the shenandoah-dev mailing list