<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
When <a href="https://bugs.openjdk.org/browse/JDK-8272807" data-outlook-id="489eee43-76a3-44c3-bf2c-dddc35543e9e">
https://bugs.openjdk.org/browse/JDK-8272807</a> was fixed, we changed from using a volatile store of 0 to using an atomic increment by 0.  That allows the pre-touch threads to race against the application threads to commit reserved pages of the heap.  Asynchronous
 pre-touching should be a start-up time win over synchronous pre-touching.  </div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Atomic increment by 0 also had the effect of fragmenting transparent huge pages on aarch64 Linux systems.  <a href="https://bugs.openjdk.org/browse/JDK-8315923" data-outlook-id="c08fe9e5-6a30-40ba-bc0b-2930b5d05d81">https://bugs.openjdk.org/browse/JDK-8315923</a> addressed
 that issue for more modern Linux systems by using a new madvise flag (MADV_POPULATE_WRITE) to pre-fault pages without needing to write each individual base page.</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Why was there not an option added to choose how pages were pre-touched?  That way, users stuck on older Linux kernels could trade whatever start-up improvement they got from asynchronous pre-touching against the cost of the kernel reassembling transparent huge
 pages during execution.  Would there be objections to adding an AlwaysPreTouchSynchronously flag to revert to volatile stores and to delay until all the pre-touching was complete before letting Java code run in the heap?</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">      </span><span style="font-size: 16px;">      </span>…<span style="font-size: 16px;"> peter</span><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">      </span></div>
</body>
</html>