RFR: 8256155: Allow multiple large page sizes to be used on Linux [v15]

Stefan Johansson sjohanss at openjdk.java.net
Thu Apr 29 19:52:52 UTC 2021


On Sat, 13 Mar 2021 07:25:12 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/os/linux/os_linux.cpp line 4046:
>> 
>>> 4044:   // Select large_page_size from _page_sizes
>>> 4045:   // that is smaller than size_t bytes
>>> 4046:   size_t large_page_size = os::page_size_for_region_aligned(bytes, 1);
>> 
>> This one also needs to use `os::page_size_for_region_unaligned(...)` since we know we have a size that needs both small and large pages.
>
> +1 to what stefan wrote

My comment here is a bit outdated. Now this function is used for both the "mixed" and the "only" case. As I see it we have to possibilities here. Either we stall this change a bit longer and let me finish the `ReservedSpace` work I've been doing lately. I have a patch coming out tonight or tomorrow that will add a page size member to `ReservedSpace`. I could then make a change to the `reserve_memory_special` API to pass a page size along with the other parameters and then this change will only be about enabling multiple page sizes. Everything else should just work. Alternatively we have to come up with some helper that decide the page size given the current alignment and size.

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

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



More information about the hotspot-gc-dev mailing list