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
Mon Jan 18 13:50:39 UTC 2021
On Mon, 18 Jan 2021 13:14:28 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> I think a more complete solution is to check the nr_hugepages. Additionally, this will be required by the solution you propose above that would consider "largest possible page size with enough pages free".
>
> I think so too. The "largest possible page size..." could be solved anyway, by just retrying all configured pages sizes until we find one that works. But it would be much more efficient to just try the page size that actually could work.
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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1153
More information about the hotspot-gc-dev
mailing list