RFR: 8191565: Last-ditch Full GC should also move humongous objects [v3]

Ivan Walulya iwalulya at openjdk.org
Wed Mar 15 17:00:38 UTC 2023


> Hi All,
> 
> Please review this change to move humongous regions during the Last-Ditch full gc ( on `do_maximal_compaction`). This change will enable G1 to avoid encountering Out-Of-Memory errors that may occur due to the fragmentation of memory regions caused by the allocation of large memory blocks.
> 
> Here's how it works: At the end of `phase2_prepare_compaction`, G1 performs a serial compaction process for regular objects, which results in the heap being divided into two parts. The first part is a densely populated prefix that contains all the regular objects that have been moved. The second part consists of the remaining heap space, which may contain free regions, uncommitted regions, and regions that are not compacting. By moving/compacting the humongous objects in the second part of the heap closer to the dense prefix, G1 reduces the region fragmentation and avoids running into OOM errors.
> 
> We have enabled for G1 the Jtreg test that was previously used only for Shenandoah to test such workload. 
> 
> Testing: Tier 1-3

Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:

  StefanJ review

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/12830/files
  - new: https://git.openjdk.org/jdk/pull/12830/files/6f8dd514..ac6bb065

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

  Stats: 23 lines in 5 files changed: 0 ins; 2 del; 21 mod
  Patch: https://git.openjdk.org/jdk/pull/12830.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12830/head:pull/12830

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


More information about the hotspot-gc-dev mailing list