RFR: 8319867: GenShen: Make old regions parseable at end of concurrent cycles

William Kemper wkemper at openjdk.org
Thu Nov 9 21:40:53 UTC 2023


### Background
When Shenandoah is performing a concurrent mark of the old generation, it is not safe for the young generation's remembered set scan to use the old mark bitmap. For this reason, any old regions that were not included in a collection set (either mixed or a global collection) must be made _parseable_ for the remembered set scan (we call this "coalescing and filling" in the code).

### Description
Before this change, Shenandoah has deferred making these regions parseable until it begins the young generation bootstrap cycle. This is fine, except that we have also recently made old generation collections subordinate to young collections. In other words, an old collection cannot start unless Shenandoah wants to first start a young collection.

Unfortunately, the additional time to concurrently coalesce and fill old regions before resetting the old mark bitmaps is not accounted for in the heuristics and this increases the likelihood that the heuristic has started the cycles too late and that the cycle will degenerate into a stop the world pause.

After this change, Shenandoah will make old regions parseable immediately following the last mixed collection (or following a global collection). At this point, Shenandoah has just finished reclaiming memory and we expect less urgency to coalesce and fill old regions. It also means that young bootstrap cycles will not take (much) longer than conventional young generation collections.

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

Commit messages:
 - Fix up documentation
 - Do not change class unloading configuration for degenerated cycles
 - Merge remote-tracking branch 'shenandoah/master' into make-old-parseable-after-evac
 - Purge SATB buffers if necessary at the end of an abbreviated cycle
 - Log if remembered set scan is using mark bitmap or not
 - Don't allow generation to change after we've decided on class unloading
 - Do not attempt to unload classes when resuming old gc operations
 - WIP: Reset old at start of bootstrap cycle
 - WIP: Remove unused parameters
 - WIP: Fix simple issue
 - ... and 2 more: https://git.openjdk.org/shenandoah/compare/20172ba8...012068ac

Changes: https://git.openjdk.org/shenandoah/pull/355/files
 Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=355&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8319867
  Stats: 261 lines in 17 files changed: 78 ins; 93 del; 90 mod
  Patch: https://git.openjdk.org/shenandoah/pull/355.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/355/head:pull/355

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


More information about the shenandoah-dev mailing list