RFR (S): 8079208: gc/g1/TestLargePageUseForAuxMemory.java fails due to not considering page allocation granularity for setup

Jon Masamitsu jon.masamitsu at oracle.com
Wed May 13 21:50:55 UTC 2015



On 5/13/2015 8:03 AM, Thomas Schatzl wrote:
> Hi all,
>
>    can I have reviews for the following test fix: the problem is that
> during test setup, when trying to find the heap size where large pages
> are just not used, the code subtracts a fixed value from the one known
> to use large pages for the card table.
>
> The problem is that this fixed value is too small to have an impact on
> the actual size of the card table, i.e. the code rounds up by the OS'es
> allocation granularity. That causes it to use the same size as before,
> where it will then use large pages anyway and fail the test.
>
> That fixed value has been just large enough to cover regular page size.
>
> Also, the only OS that has different allocation granularities and
> (small) page sizes is Windows. Further on Windows, large pages (and the
> test is only executed then) are only available when the user runs as
> Administrator (or has the corresponding capability to lock pages in
> memory).
Thomas,

Is there a change for this need to run the test with sufficient privileges?

>
> In this case the test fails.
>
> The change fixes this by making sure that this value to subtract from
> the original heap size is exactly the size that avoids this rounding.

The fix to the test looks good.

Is it important to the test that the amount subtracted be the minimum
needed to disable large pages?  I mean, is the test less useful if
twice that minimum was subtracted?

For

>   119             final long heapSizeDiffForCardTable = Math.max(Math.max(allocGranularity * cardSize, HEAP_REGION_SIZE), largePageSize);

would this description be correct?

// Minimum change in heap size that will disable large pages for the 
card table if subtracted from
// the heap size.  Increasing the heap by this amount should not change 
the use of large pages
// for the card table.

If yes, would you mind adding it.

Thanks.

Jon
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8079208
>
> Webrevs:
> http://cr.openjdk.java.net/~tschatzl/8079208/webrev/ (for hotspot
> changes)
> http://cr.openjdk.java.net/~tschatzl/8079208/webrev.hs-gc/ (for changes
> in the hs-gc directory, i.e. whitebox.java)
>
> Testing:
> Manual testing, jprt
>
> Thanks,
>    Thomas
>
>



More information about the hotspot-gc-dev mailing list