RFR: 8272773: Investigate making card table size configurable

Vishal Chand github.com+10235864+vish-chan at openjdk.java.net
Fri Oct 8 08:52:12 UTC 2021


On Thu, 7 Oct 2021 11:10:07 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hi,
>> 
>> Please review the changes to make CardTable entry size configurable. The changes primarily consists of:
>> 
>> 1. Addition of a cmdline flag **GCCardSizeInBytes** to make the card size startup time configurable.
>> 2. Setting the card size based on the flag in G1, Parallel and Serial GC memory initialization paths.
>> 3. Setting BlockOffsetTable size and ObjectStartArray size based on the card size.
>
> src/hotspot/share/gc/shared/cardTable.cpp line 64:
> 
>> 62:     FLAG_SET_ERGO(GCCardSizeInBytes, card_size);
>> 63:   }
>> 64: 
> 
> This would also be unnecessary with a constraint function that limits the values of the option.

**FLAG_SET_ERGO** is needed for G1 GC. In case of G1, min card size is determined by the region size. 
For the following cmdline arguments: -XX:G1HeapRegionSize=32M -XX:GCCardSizeInBytes=256 
---- card_size is ergonomically set to 512 instead of 256, as min. card size for 32M region is 512.

> src/hotspot/share/gc/shared/cardTable.hpp line 234:
> 
>> 232:   static uintx card_shift;
>> 233:   static uintx card_size;
>> 234:   static uintx card_size_in_words;
> 
> Please do not use `uintx`; I think `uint` is just fine for those.

I tried using uint, but card_size is being treated as a uintx everywhere in the code. So I'm observing compilation errors with uint.

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

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



More information about the hotspot-gc-dev mailing list