RFR (xs): 8211735: Wrong heap mapper can be selected with UseLargePages on G1

sangheon.kim at oracle.com sangheon.kim at oracle.com
Wed Nov 7 21:22:26 UTC 2018


Hi all,

Can I have reviews for this tiny patch fixes wrong heap mapper selection 
with UseLargePages on G1?

When we enable UseLargePages but failed allocating with large page, G1 
is not correctly reflecting it.
This situation only happens when G1HeapRegionSize is less than or equal 
to large page size.
e.g. G1HeapRegionsSize=1MB, default page size=4KB, large page size=2MB. 
G1 selects G1RegionsSmallerThanCommitSizeMapper (G1HeapRegionSize < 
large page size, at G1RegionToSpaceMapper::create_mapper()) but actually 
we are using default page(failed allocating with large page) so 
G1RegionsLargerThanCommitSizeMapper should be selected. Eventually G1 
commits memory with not optimal way(it works) and pages will not touched 
properly when AlwaysPreTouch option is enabled.

CR: https://bugs.openjdk.java.net/browse/JDK-8211735
Webrev: http://cr.openjdk.java.net/~sangheki/8211735/webrev.0
Testing: hs-tier1, hs-tier2, hs-tier3

Thanks,
Sangheon



More information about the hotspot-gc-dev mailing list