RFR: JDK-8256155: os::Linux Populate all large_page_sizes, select smallest page size in reserve_memory_special_huge_tlbfs* [v15]

Stefan Johansson sjohanss at openjdk.java.net
Tue Jan 19 10:38:55 UTC 2021


On Tue, 19 Jan 2021 09:25:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Ok, maybe I should try it out as well :) 
>> 
>> Regarding allocation at startup vs later, is the plan to make new reservations during the run or supporting uncommit of large pages. Currently if a `ReservedSpace` is special (uses large pages), uncommit is disabled  and all pages are committed up front. Is your plan to change this or will it work by adding and removing `ReservedSpace`s. I have not had time to look at the new `Metaspace` implementation in detail yet.
>
> 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.

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

PR: https://git.openjdk.java.net/jdk/pull/1153



More information about the hotspot-gc-dev mailing list