RFR: 8348595: GenShen: Fix generational free-memory no-progress check [v4]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Feb 11 18:15:58 UTC 2025


> At the end of a degenerated GC, we check whether sufficient progress has been made in replenishing the memory available to the mutator. The test for good progress is implemented as a ratio of free memory against the total heap size.
> 
> For generational Shenandoah, the ratio should be computed against the size of the young generation. Note that the size of the generational collection set is based on young generation size rather than total heap size.
> 
> This issue first identified in GenShen GC logs, where a large number of degenerated cycles were upgrading to full GC because the free-set progress was short of desired by 10-25%.

Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:

 - Merge tag 'jdk-25+9' into fix-generational-no-progress-check
   
   Added tag jdk-25+9 for changeset 30f71622
 - Add comments suggested by reviewers
 - Respond to reviewer feedback
   
   In testing suggested refinements, I discovered a bug in original
   implementation.  ShenandoahFreeSet::capacity() does not represent the
   size of young generation.  It represents the total size of the young
   regions that had available memory at the time we most recently rebuilt
   the ShenandoahFreeSet.
   
   I am rerunning the performance tests following this suggested change.
 - Use freeset to determine goodness of progress
   
   As previously implemented, we used the heap size to measure goodness of
   progress.  However, heap size is only appropriate for non-generational
   Shenandoah.  Freeset abstraction works for both.
 - Use size-of young generation to assess progress
   
   Previously, we were using size of heap to asses progress of generational
   degenerated cycle.  But that is not appropriate, because the collection
   set is chosen based on the size of young generation.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/23306/files
  - new: https://git.openjdk.org/jdk/pull/23306/files/8f644cdb..8c610136

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23306&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23306&range=02-03

  Stats: 43531 lines in 2988 files changed: 18658 ins; 14204 del; 10669 mod
  Patch: https://git.openjdk.org/jdk/pull/23306.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23306/head:pull/23306

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


More information about the hotspot-gc-dev mailing list