FW: RFR(S): 8130434: [TESTBUG] Harden TestLargePageUseForAuxMemory for more page size combinations.
goetz.lindenmaier at sap.com
Mon Jul 20 10:15:50 UTC 2015
thanks a lot!
> I will wait a bit until pushing, maybe someone else has some time
> looking at this.
From: Thomas Schatzl [mailto:thomas.schatzl at oracle.com]
Sent: Montag, 20. Juli 2015 12:11
To: Lindenmaier, Goetz
Cc: hotspot-gc-dev at openjdk.java.net
Subject: Re: FW: RFR(S): 8130434: [TESTBUG] Harden TestLargePageUseForAuxMemory for more page size combinations.
On Mon, 2015-07-20 at 09:26 +0000, Lindenmaier, Goetz wrote:
> Thanks for picking this up!
> > I can sponsor the change.
> That's great, thank you.
> > > We have a machine with page size = 64K and large page size 4M.
> > > In this case heapSizeDiffForBitmap was too small to reduce the
> > > heap
> > > Due to the big value for the normal page size heap alignment is >
> > > largePageSize
> > > and the heap size was aligned up to the original value.
> > > Error: "'G1 'Prev Bitmap': pg_sz=65536' missing from
> > > stdout/stderr"
> > > Fix: consider heap alignement for heapSizeDiffForBitmap.
> > I am possibly missing something here:
> > So page size is 64k, large page size 4M.
> > In this case, heapSizeForBitmapUsingLargePages = 4M * 64 = 256M,
> > and
> > heapSizeDiffForBitmap is (assuming allocGranularity = page
> > size = 64k),
> > max(4M (=64k * 64), 1M, 4M)
> > = 4M, which does not seem to be an issue?
> > Further, the use of lcm indicates that the actual reason is that in
> > some
of your setups, small-page-size * card size > largePageSize? It
> > is
possible, so this is just another try to make the test more
> > robust?
> To find out the heap alignment, I must do the same as is done in the
> The lcm stems from collectorPolicy.cpp:181,
> The VM runs with heap alignment 512*64K = 32M.
> You are correct, the old test used heapSizeDiffForBitmap = 4M.
> So test case6 does: heapSizeForBitmapUsingLargePages -
heapSizeDiffForBitmap is 252M. Because of
> the large heap alignment, this was rounded up by the VM to 256 again,
failing the test. Actually,
> it falls back to test case4.
> After my fix,
> heapSizeDiffForBitmap = 32M.
> heapSizeForBitmapUsingLargePages - heapSizeDiffForBitmap is 224M
> and the VM comes up with that heap size, passing the test.
I overlooked the card table alignment requirement. With 64k small page
size this is 32M...
I will wait a bit until pushing, maybe someone else has some time
looking at this.
More information about the hotspot-gc-dev