RFR: 8324817: Parallel GC does not pre-touch all heap pages when AlwaysPreTouch enabled and large page disabled [v2]

Wang Zhuo wzhuo at openjdk.org
Wed Jan 31 03:54:04 UTC 2024


On Tue, 30 Jan 2024 12:56:52 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Wang Zhuo has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update the test. Baseline changed from 90%* committed memory to 100%
>
> test/hotspot/jtreg/gc/parallel/TestAlwaysPreTouchBehavior.java line 79:
> 
>> 77:     Runtime runtime = Runtime.getRuntime();
>> 78:     long committedMemory = (runtime.totalMemory()) / 1024; // in kb
>> 79:     long base = (long)(committedMemory * 0.9);
> 
> What's the meaning of `0.9` here? Why can one use `committedMemory` directly?

0.9 removed, just use  committedMemory directly in the updated test

> test/hotspot/jtreg/gc/parallel/TestAlwaysPreTouchBehavior.java line 94:
> 
>> 92:         System.out.println("Passed RSS = " + rss + " base value " + base);
>> 93:     }
>> 94:     Asserts.assertTrue(rss >= base, "heap rss should be bigger than committed heap mem");
> 
> Could this be just `Asserts.assertTrue(rss >= base, "RSS: " + rss + " should be >= Committed Heap Mem: " + base);`?

I think it is OK to use committed heap mem. Test updated

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17610#discussion_r1472272620
PR Review Comment: https://git.openjdk.org/jdk/pull/17610#discussion_r1472272325


More information about the hotspot-gc-dev mailing list