RFR: 8236073: G1: Use SoftMaxHeapSize to guide GC heuristics [v9]

Man Cao manc at openjdk.org
Sat May 17 05:15:15 UTC 2025


> Hi all,
> 
> I have implemented SoftMaxHeapSize for G1 as attached. It is completely reworked compared to [previous PR](https://github.com/openjdk/jdk/pull/20783), and excludes code for `CurrentMaxHeapSize`. I believe I have addressed all direct concerns from [previous email thread](https://mail.openjdk.org/pipermail/hotspot-gc-dev/2024-November/050214.html), such as:
> 
> - does not respect `MinHeapSize`;
> - being too "blunt" and does not respect other G1 heuristics and flags for resizing, such as `MinHeapFreeRatio`, `MaxHeapFreeRatio`;
> - does not affect heuristcs to trigger a concurrent cycle;
> 
> [This recent thread](https://mail.openjdk.org/pipermail/hotspot-gc-dev/2025-March/051619.html) also has some context.

Man Cao 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 nine additional commits since the last revision:

 - Merge branch 'master' into JDK-8236073-softmaxheap
 - Use Atomic::load for flag
 - Fix test failure on macos-aarch64 by using power-of-two sizes.
 - Address comments and try fixing test failure on macos-aarch64
 - Revise test summary
 - Add two tests
 - Merge branch 'master' into JDK-8236073-softmaxheap
 - Update copyright year.
 - G1: Use SoftMaxHeapSize to guide GC heuristics

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24211/files
  - new: https://git.openjdk.org/jdk/pull/24211/files/c60ade41..fc87a0bf

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24211&range=08
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24211&range=07-08

  Stats: 365086 lines in 4371 files changed: 126146 ins; 220004 del; 18936 mod
  Patch: https://git.openjdk.org/jdk/pull/24211.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24211/head:pull/24211

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


More information about the hotspot-gc-dev mailing list