RFR: 8315923: pretouch_memory by atomic-add-0 fragments huge pages unexpectedly [v6]

Liming Liu duke at openjdk.org
Fri Oct 20 05:44:40 UTC 2023


On Wed, 4 Oct 2023 14:00:04 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Liming Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make the jtreg test checke the usage of THP
>
> src/hotspot/os/linux/os_linux.cpp line 2911:
> 
>> 2909:   if (::madvise(first, len, MADV_POPULATE_WRITE) == -1) {
>> 2910:     int err = errno;
>> 2911:     if (err == EINVAL) { // Not supported
> 
> Would be nice to avoid repeated syscalls to madvise if this fails once; no reason to try again, then.

I tested the performance of this patch on kernel 4.18 and 5.13, and found the repeat calls have no impact. So I would not change anything about this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15781#discussion_r1366496241


More information about the hotspot-runtime-dev mailing list