RFR: 8324781: runtime/Thread/TestAlwaysPreTouchStacks.java failed with Expected a higher ratio between stack committed and reserved [v2]
David Holmes
dholmes at openjdk.org
Mon Mar 25 02:25:24 UTC 2024
On Thu, 21 Mar 2024 06:17:26 GMT, Liming Liu <duke at openjdk.org> wrote:
>> src/hotspot/os/linux/os_linux.cpp line 4852:
>>
>>> 4850: // See https://github.com/oracle/linux-uek/issues/23
>>> 4851: const int flag = MADV_POPULATE_WRITE + (os::Linux::_is_uek_release ? 1 : 0);
>>> 4852: FLAG_SET_DEFAULT(UseMadvPopulateWrite, (::madvise(0, 0, flag) == 0));
>>
>> I read the supporting material and I still can't get this sorted in my head. From my reading some UEK versions have this problem and some do not. But you do this "trick" for all UEK versions and I just don't understand how that works. ??
>
> Personally, I think it is safe to check 24 for all UEK versions:
> - for versions prior to 5.15 UEK, 23 is supported as MADV_DONTEXEC, while 24 is not supported;
> - for 5.15 (, 5.16 and 5.17 if existed) UEK, 23 is supported as MADV_POPULATE_WRITE, while 24 is supported as MADV_DOEXEC;
> - for 5.18 UEK or newer, both 23 and 24 are supported as the same functions as upstream.
So what is the affect of using MADV_DOEXEC when the intent was to use MADV_POPULATE_WRITE?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18417#discussion_r1536989775
More information about the hotspot-runtime-dev
mailing list