RFR: 8268127: Shenandoah: Heap size may be too small for region to align to large page size [v3]

Roman Kennke rkennke at openjdk.java.net
Mon Jun 7 12:27:02 UTC 2021


On Thu, 3 Jun 2021 00:12:02 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> TestLargePages.java failed on Linux AArch64, where large page size is 500M, and the test is configured to run with much smaller heap, e.g. 131M.
>> 
>> This is *not* AArch64 specific, just none of our regular test machines has large page setup.
>> 
>> I purpose two invariants:
>> 1) Heap size always aligns up to page size that is requested.
>> 2) Region size always aligns up to page size that is requested if heap is large enough to accommodate them. Otherwise, it aligns up to regular page size.
>> 
>> This partially reverts JDK-8266802.
>> 
>> Obviously, this is a corner case and is unlikely seen in real word. The alternative is to disable UseLargePages if heap size is too small, e.g. align_up(heap_size, page_size) < MIN_NUM_REGIONS.
>> 
>> Test:
>>   hotspot_gc_shenandoah
>
> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Window build

Please check what is up with pre-submit tests.

src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp line 470:

> 468: }
> 469: 
> 470: void ShenandoahHeapRegion::setup_sizes(size_t& max_heap_size) {

I wonder if it would be clearer to return the adjusted max_heap_size instead?

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

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


More information about the hotspot-gc-dev mailing list