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 07:09:52 UTC 2021


On Mon, 18 Jan 2021 13:59:02 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> One also can set nr_overcommit_hugepages>0 and have a "dynamic" large page pool this way, even with nr_hugepages=0. Moreover, these settings can change during the lifetime of the VM. I would not bother adding too much logic here. Allocating huge pages may or may not fail anyway and the VM has to be prepared to deal with failure. Just my 5c.
>
> The "dynamic part" might make this actually being "too much logic", otherwise if feels like a pretty reasonable check. The fact that huge pages can be added during the runtime of the JVM doesn't feel like a big problem, since most large reservations are done at startup. 
> 
> But you might be right, since we have to handle the case of a failed mapping, it might not be to big of a problem trying all possible page sizes.

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.

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

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



More information about the hotspot-gc-dev mailing list