[sh/jdk8u] RFR 8265239: Shenandoah: Shenandoah heap region count could be off by 1

Zhengyu Gu zgu at redhat.com
Wed Apr 28 18:14:33 UTC 2021


I would like to backport this patch to Shenandoah 8u. Shenandoah may 
under calculate the number of heap regions, that results some of 
otherwise, available regions unused.

The original bug: https://bugs.openjdk.java.net/browse/JDK-8265239
The original patch: https://github.com/openjdk/jdk/commit/ff5bb8cf

The original patch does not apply cleanly and 8u patch is somewhat 
different from the original patch.

In 8u, heap size adjustment is more than aligning up to region boundary, 
but more complicated. For example, TestAlignmentToUseLargePages.java, 
region count is actually off by 4 (36 vs. 40).

In 8u patch, I chosed to defer region count calculation until size 
adjustment is done.

Test:
   hotspot_gc_shenandoah

Thanks,

-Zhengyu




More information about the shenandoah-dev mailing list