RFR: 8214455: Relocate CDS archived regions to the top of the G1 heap [v3]

Ioi Lam iklam at openjdk.java.net
Wed Apr 7 19:46:44 UTC 2021


> When the runtime heap and dump time heap have different sizes, it's possible that the archived heap regions are mapped to the middle of the runtime heap. Because the archived heap regions are pinned, this could reduce the size of the largest "humongous" array allocation. In the worst case, the maximum allocatable array length may be half of the optimal value.
> 
> The fix is to relocate the archived regions to the top of the  G1 heap (currently archived regions are supported only by G1 on 64-bit JVM).
> 
> Note that usually the top of the G1 heap is placed just below the 32GB boundary. As a result, the archived heap regions are at the same location between run time and dump time, so no relocation is necessary.
> 
> In mach5 testing, we occasionally run into this problem (see https://bugs.openjdk.java.net/browse/JDK-8239089), probably because we fail to reserve the heap below 32GB due to address space layout randomization (ASLR).

Ioi Lam 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 branch 'master' into 8214455-relocated-archived-regions-to-heap-top
 - fixed indentation (review comment by @calvinccheung)
 - @tschatzl review -- fix typos and whitespace
 - Added -Xlog:cds=debug in case this test fails again
 - 8214455: Relocate CDS archived regions to the top of the G1 heap

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3349/files
  - new: https://git.openjdk.java.net/jdk/pull/3349/files/bedd676d..43ee9680

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3349&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3349&range=01-02

  Stats: 4956 lines in 137 files changed: 2977 ins; 1596 del; 383 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3349.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3349/head:pull/3349

PR: https://git.openjdk.java.net/jdk/pull/3349



More information about the hotspot-gc-dev mailing list