RFR: 8272773: Investigate making card table size configurable [v3]

Thomas Schatzl tschatzl at openjdk.java.net
Tue Nov 16 08:33:42 UTC 2021


On Wed, 13 Oct 2021 10:50:20 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Vishal Chand has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Merge branch 'card-size-configurable' of https://github.com/vish-chan/jdk into card-size-configurable
>>  - Changes as per the first set of comments
>
> src/hotspot/share/gc/parallel/objectStartArray.hpp line 60:
> 
>> 58: 
>> 59:   // This maximum is derived from that we need an extra bit for possible
>> 60:   // offsets in the byte for backskip values (this is a hard limit)
> 
> Suggestion:
> 
>   // Maximum size an offset table entry can cover. This maximum is derived from that we need an extra bit for possible
>   // offsets in the byte for backskip values, leaving 2^7 possible offsets. Mininum object alignment is 8 bytes (2^3), so we can at most represent 2^10 offsets within a BOT value.
> 
> 
> (We *could* make this maximum dependent on `ObjectAlignmentInBytes`, but I do not know if increasing ObjectAlignmentInBytes gives any advantage. So at most defer this investigation to some other time as I'm already keeping busy some machines)

Maybe it is interesting to make this size depend on current `ObjectAlignmentInBytes` after all. I've seen some recent testing where it proved useful. However that may be done as a separate change.
It also seems that reducing the size of the BOT/card table (increasing this maximum) has diminishing returns e.g. wrt to Card Table Clear times.

Maybe it is interesting for you to try out even larger card sizes though (e.g. an `ObjectAlignmentInBytes` value of `16` should allow a card size of 2048 and so on).

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

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


More information about the hotspot-gc-dev mailing list