JDK-8300770 : G1: Allow optional code root memregions
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 21
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-01-20
  • Updated: 2023-03-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Duplicate :  
Relates :  
Description
Code root memregions are areas determined in the concurrent start pause that need to be scanned for references into the old gen before they can be evacuated (because evacuation might drop objects and references, evacuation may cause an incomplete snapshot).

Currently this set of memregions includes all areas that were allocated into during concurrent start, both survivor and old gen allocation regions; scanning these areas can block garbage collection (because they need to be scanned before evacuation as mentioned above).

However it is only absolutely necessary to scan regions that are about to be evacuated in the next gc - i.e. survivor regions. The old gen allocation regions root region scan may be deferred (as currently newly allocated old gen regions can not be evacuated, and due to G1 phasing, these regions can not have remembered sets for evacuation).

With the plan to try to evacuate evacuation failed (or in general, retained regions) as soon as possible, there may be many more old gen regions (with remembered sets) that may be evacuated and ought to be scanned before they can be evacuated.

This impacts pause times, so the idea here is to split the root (mem-)regions into two parts: one that still absolutely needs to be scanned (i.e. survivor regions), and one that may be deferred but does not block garbage collection.

(Obviously, not yet scanned regions may not be evacuated, but at this time there is no plan to do that anyway).