RFR: JDK-8256155: os::Linux Populate all large_page_sizes, select smallest page size in reserve_memory_special_huge_tlbfs* [v15]
Thomas Stuefe
stuefe at openjdk.java.net
Tue Jan 19 10:38:55 UTC 2021
On Tue, 19 Jan 2021 09:31:43 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> As it is now in my head, using LP on Metaspace would disable on-demand uncommitting (there is a second stage release of memory unaffected by this, where ReservedSpace segments get unmapped, but that is rare due to fragmentation. Due to the large page size uncommit on demand would be much less effective anyway than with normal pages.
>>
>> I am vaguely aware however of someones (yours?) experiments with "soft uncommit" - madvise(MADV_FREE) - and was planning on playing around with this too. Depending on how that plays out it may be a way to get uncommit-like behavior for large pages.
>
> Yes, we've done some experiments using `madvise`. Some results looked promising and others a bit surprising, but I didn't actually looked at how it would affect `HUGETLB` large pages. But yes, it might be a way to get better behavior for large pages.
Maybe we also could take another look at the "never-remap-hugepages" rule added with JDK-8007074. I understand why stefank did that, but maybe if one added safety measures (eg before remapping making sure that we have enough huge pages in the pool with a large margin) and combined with a switch it would be safe enough.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1153
More information about the hotspot-gc-dev
mailing list