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

Thomas Schatzl tschatzl at openjdk.java.net
Mon Oct 11 13:50:12 UTC 2021


On Sun, 10 Oct 2021 12:31:43 GMT, Vishal Chand <github.com+10235864+vish-chan at openjdk.org> wrote:

>> Also please do not scale card table entry size with region size - there are some applications (many references, large remembered sets; e.g. the one in [JDK-8152438](https://bugs.openjdk.java.net/browse/JDK-8152438)) that with a 1024 card table size show 30% longer pause times. (Actually, they benefit a lot from smaller card table entry size, i.e. they get around the same pause time improvement with e.g. 256 byte sized card table entry size if heap region size permits).
>
> Currently I'm not scaling card size with region size, as it is not required. With current supported region sizes (1M to 32M) and card sizes (512b, 1024B), all the possible combinations of region size and card size are valid combinations. If we include 256b cards or 64M regions, then invalid combinations will be there which would need to be handled. 
> Do you think that code/logic is needed now, or we can add if and when needed?

Okay, let's leave it at that for now.

Note that all that kept me thinking over the weekend, and I found an easy way (the remembered set refactoring in 18 made that possible) to completely decouple heap region size from remembered sets.

So soon we'll be able to have heap region sizes > 32M without any restrictions. Same for card table sizes, they can be set independently of region size now (although 1024 is max as long as we fix BOT and card table size to the same).

Then we can re-introduce the option to allow smaller (probably 256, *maybe* 128) card table sizes.

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

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



More information about the hotspot-gc-dev mailing list