RFR: 8272773: Investigate making card table size configurable
Vishal Chand
github.com+10235864+vish-chan at openjdk.java.net
Fri Oct 8 14:26:12 UTC 2021
On Fri, 8 Oct 2021 12:49:32 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> src/hotspot/share/gc/g1/heapRegion.cpp line 96:
>>
>>> 94: // Initialize card size based on the region size.
>>> 95: // Maximum no. of cards per region is 2^16.
>>> 96: CardTable::initialize_card_size(1 << (region_size_log - 16));
>>
>> Please make a constant out of the `16`; the reason is the size of the `G1CardSetArray::EntryDataType` being 16 bit.
>
> Another question we need to answer is whether smaller card size than 512 gains anything - if not, I recommend keeping to use 512 at minimum, as otherwise the card table will obviously use much more memory for no gain.
I'm trying to identify the usecases where we can see better performance with small card sizes. Right now, I have none. So, I'll set the minimum card size to 512 right now. Intention is to have a design such that if someone finds a usecase which gives better performance with smaller cards, only the minimum card size needs to be changed in the code, nothing else. Shall I keep this current behavior of overriding card_size based on region size till there's some feedback from others? or Do I need to change this?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5838
More information about the hotspot-gc-dev
mailing list