RFR: 8324781: runtime/Thread/TestAlwaysPreTouchStacks.java failed with Expected a higher ratio between stack committed and reserved [v2]

Liming Liu duke at openjdk.org
Mon Mar 25 02:50:21 UTC 2024


On Mon, 25 Mar 2024 02:22:55 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> 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?

MADV_DOEXEC is not used in os::pd_pretouch_memory, but just used in os::init_2 for 5.15 UEK. The key is MADV_POPULATE_WRITE is supported as 23 on UEK releases if and only if 24 is supported. If the code is confusing, I will check whether the version of kernel is newer than 5.14 here rather than checking the support of 24.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18417#discussion_r1537001297


More information about the hotspot-runtime-dev mailing list