RFR: 8272773: Investigate making card table size configurable

Thomas Schatzl tschatzl at openjdk.java.net
Fri Oct 8 10:02:09 UTC 2021


On Fri, 8 Oct 2021 08:46:36 GMT, Vishal Chand <github.com+10235864+vish-chan at openjdk.org> wrote:

>> 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.

Let's leave this question out for now: I am not sure it makes sense to allow a card size of 256; however the common reaction when specifying incompatible command line options would be to bail out.
The question is what to do if the user selects GCCardSizeInBytes=256 and G1 ergonomically decides to use 32m regions. Silently use 16m regions, which are very likely worse than 32m regions in that case?
That is why we should first determine if card size of 256 makes sense somewhere and then decide (or somebody else has a particular opinion on this).

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

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



More information about the hotspot-gc-dev mailing list