JDK-8286943 : G1: With virtualized remembered sets, maximum number of cards configured is wrong
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 18,19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-05-18
  • Updated: 2022-05-26
  • Resolved: 2022-05-20
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.
JDK 19
19 b24Fixed
Related Reports
Relates :  
Description
 https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/g1/g1CardSet.cpp#L58

The max #cards in a heap region is passed to max_cards_in_card_set, but the heap range covered by a cardset container is not necessary a region. If the #cards_in_region is too large, multiple cardset containers are required to fully cover that heap range.


* This prevents upgrading a Howl container to Full with virtualized remembered sets (Heap regions >= 64M) as the (default) threshold for coarsening from Howl to Full is max_cards_in_cardset * 0.9, which is always higher than the value tested against (65k, max card set container element number).
* This also unnecessarily increases the bits used for inline ptrs


g1CardSet.cpp:58

                         (uint)HeapRegion::CardsPerRegion,                          /* max_cards_in_cardset */

(found by ayang)
Comments
Changeset: 6569666b Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2022-05-20 07:39:26 +0000 URL: https://git.openjdk.java.net/jdk/commit/6569666b050e8b6f3a0aae7d14d96007a1e429b3
20-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8773 Date: 2022-05-18 15:22:03 +0000
18-05-2022