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

David Holmes dholmes at openjdk.org
Wed Apr 17 07:34:00 UTC 2024


On Wed, 17 Apr 2024 03:15:40 GMT, Liming Liu <duke at openjdk.org> wrote:

>> For example, Linux 5.4-UEK does not support populating pages, and `MADV_POPULATE_WRITE` is not defined there. However, the kernel internally interprets 23 as `MADV_DONEXEC`, while 23 is a value used by upstream kernels as `MADV_POPULATE_WRITE`. `MADV_POPULATE_WRITE_value` is used by hotspot internally, and used for compiling JDK properly when `MADV_POPULATE_WRITE` is not defined. `MADV_POPULATE_WRITE_value` was suggested there: https://github.com/openjdk/jdk/pull/15781#discussion_r1345784162
>
> Additionally, if `MADV_POPULATE_WRITE` is defined but not the same as `MADV_POPULATE_WRITE_value`, there will be a build failure, so hotspot is guaranteed to use 23 here regardless of compile time or runtime. 23 may not be interpreted as `MADV_POPULATE_WRITE` by a downstream kernel. A known case is a downstream of pre-5.14 kernel, so the version of kernel is checked here. This patch does not have tricks on advice numbers.

Okay the comment:

 // Some downstream kernels recognize MADV_POPULATE_WRITE_value as another

made me think we needed to check the "value" version but I see now they are already guaranteed to be the same.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18592#discussion_r1568360777


More information about the hotspot-runtime-dev mailing list