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

William Kemper wkemper at openjdk.org
Fri Jan 12 00:30:30 UTC 2024


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.

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

Commit messages:
 - Use _no_gc consistently, prioritize mutator gc requests
 - Fix race condition that could cause control thread to ignore concurrent gc requests

Changes: https://git.openjdk.org/shenandoah/pull/382/files
 Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=382&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8323630
  Stats: 69 lines in 2 files changed: 21 ins; 27 del; 21 mod
  Patch: https://git.openjdk.org/shenandoah/pull/382.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/382/head:pull/382

PR: https://git.openjdk.org/shenandoah/pull/382


More information about the shenandoah-dev mailing list