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 09:27:50 UTC 2021


On Tue, 19 Jan 2021 08:57:42 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> I'm actually using nr_overcommit_hugepages alot (has been a tip by Per Liden) since its so convenient. As for allocation at startup, I plan on making Metaspace large-page-able again at some point in the future; that would mean larger LP allocations may happen later in VM life too.
>
> 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.

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

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



More information about the hotspot-gc-dev mailing list