RFR: 8319969: os::large_page_init() turns off THPs for ZGC [v2]

Thomas Stuefe stuefe at openjdk.org
Sat Dec 2 07:01:42 UTC 2023


On Fri, 1 Dec 2023 09:52:29 GMT, Stefan Karlsson <stefank 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/os_linux.cpp line 2886:
> 
>> 2884: 
>> 2885: void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
>> 2886:   if (HugePages::should_madvise_anonymous_thps() && alignment_hint > vm_page_size()) {
> 
> The use of `HugePages::should_madvise_anonymous_thps()` adds a change in behavior. By using it instead of `UseTransparentHugepages`, we only call `madvise` when the OS is configured to care about `madvise`. I've been using this in my testing, but I can revert back to using `UseTransparentHugepages`, and then we can change this separately with [JDK-8312468](https://bugs.openjdk.org/browse/JDK-8312468).

This makes sense. We can close https://bugs.openjdk.org/browse/JDK-8312468 as dup then.

But why don't you madvise for shmemthp ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16690#discussion_r1412735637


More information about the hotspot-dev mailing list