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

Thomas Stuefe stuefe at openjdk.java.net
Wed Feb 24 15:11:41 UTC 2021


On Wed, 24 Feb 2021 08:57:29 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

> > What do you think? I think this would be a bit easier to read and understand, and we have that clear separation between scanning OS info and deciding what we do with it.
> 
> I think what you propose Thomas looks good. One additional thing to keep in mind and think about here is how we should do the "sanity checking" when allowing multiple large page sizes. I think the best thing would be to sanity check all and if none succeeds disable `UseLargePages`.

Oh, sure. I made this not explicit but implied this under "post processing and deciding". Presumably in the context of setup_large_page_type().

> 
> > Still a small nit is that we let the user override the OS info with LargePageSizeInBytes. I rather would have a variable containing unmodified OS info, and a separate variable for whatever we make up. But thats just a small issue.
> 
> I think we need to rethink exactly what `LargePageSizeInBytes` means when allowing multiple large page sizes. I've poked around in this area quite a bit lately and I'm not sure this flag is needed when we scan for available page sizes. But to allow it to go away we would have to change the APIs a bit to start passing down the page size we want to use for a certain mapping rather than using `os::large_page_size()` to get the page size.

If we could do without this flag this would be fine for me too. But how would you let the user specify that the VM is to use a different default page size than is set on system level?

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

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



More information about the hotspot-gc-dev mailing list