<div dir="ltr"><div dir="ltr">Thank you, Andrew, for clarifying.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 26, 2023 at 1:28 PM Andrew Haley <<a href="mailto:aph-open@littlepinkcloud.com">aph-open@littlepinkcloud.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 6/23/23 13:11, Thomas Stüfe wrote:<br>
> Hi all,<br>
> <br>
> We talked about this [1] and StefanJ opened an issue open for it [2], and also I had private talks with various people. I am currently digging around in LP initialization again, and getting rid of SHM mode would be so nice. Perfect time for it too, just after LTS fork-off.<br>
> <br>
> SHM tlbfs mode causes a lot of extra complexity. Since SHM segments can only be detached as a whole, they behave more like Windows VirtualSpace instead of mmap. As in, the whole mapping cannot be split, cannot be partially uncommitted etc. As StefanJ pointed out in [2], it also requires more permissions than mmap-tlbfs mode.<br>
> <br>
> I have always had the suspicion that this is a dusty corner of hotspot that is rarely used and probably broken in many corner cases. For example, the sanity checks at VM startup are not correctly implemented, see JDK-8310262<br>
<br>
Here's the discussion that led to what we have now:<br>
<br>
<a href="https://mail.openjdk.org/pipermail/hotspot-dev/2011-April/004060.html" rel="noreferrer" target="_blank">https://mail.openjdk.org/pipermail/hotspot-dev/2011-April/004060.html</a><br>
<br>
Commit 2383:139667d9836a, is credited to<br>
<br>
7034464: Support transparent large pages on Linux<br>
Summary: Support transparent huge pages on Linux available since 2.6.38<br>
Reviewed-by: iveresov, ysr<br>
Contributed-by: <a href="mailto:aph@redhat.com" target="_blank">aph@redhat.com</a><br>
<br>
The SHM was left in because of older systems, and caution, I think.<br>
<br>
Also:<br>
<br>
 >>> Yes, but on Linux at least +UseLargePages (using all that SHM stuff)<br>
 >>> needs special permissions, so it tends not to be used as much as it<br>
 >>> could.<br></blockquote><div><br></div><div>Good point. StefanJ also mentioned this in <a href="https://bugs.openjdk.org/browse/JDK-8261894" target="_blank">https://bugs.openjdk.org/browse/JDK-8261894</a> .<br></div><div><br></div><div>Cheers, Thomas</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-- <br>
Andrew Haley  (he/him)<br>
Java Platform Lead Engineer<br>
Red Hat UK Ltd. <<a href="https://www.redhat.com" rel="noreferrer" target="_blank">https://www.redhat.com</a>><br>
<a href="https://keybase.io/andrewhaley" rel="noreferrer" target="_blank">https://keybase.io/andrewhaley</a><br>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671<br>
<br>
</blockquote></div></div>