RFR: 8319969: os::large_page_init() turns off THPs for ZGC [v2]
Stefan Karlsson
stefank at openjdk.org
Mon Dec 4 08:20:45 UTC 2023
On Sat, 2 Dec 2023 06:36:59 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Small tweaks
>
> src/hotspot/os/linux/hugepages.cpp line 321:
>
>> 319:
>> 320: const bool huge_pages_turned_off = !FLAG_IS_DEFAULT(UseLargePages) && !UseLargePages;
>> 321: _thp_requested = UseTransparentHugePages && !huge_pages_turned_off;
>
> This muddles the water a bit, since the original intent of HugePages vs whatever happens in os_linux was to let HugePages give me the unadulterated info of what the OS supports, whereas processing switches and deciding on them should happen in os_linux in large_page_init. Would it be possible to move "_thp_requested" up to the caller?
>
> We can keep the "should_madvise_anonymous_thps" since those make sense here, but move the "requested" condition up to the caller.
I've pushed a change that moves the "requested" condition out of `HugePages` and into `os::Linux`.
I also moved `should_madvise_anonymous_thps`, since it depends on the "requested" property an not only on what's available in the HugePages structs.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16690#discussion_r1413512440
More information about the hotspot-dev
mailing list