[jdk21u-dev] RFR: 8334371: [AIX] Beginning with AIX 7.3 TL1 mmap() supports 64K memory pages [v4]
Martin Doerr
mdoerr at openjdk.org
Mon Feb 3 19:13:56 UTC 2025
On Tue, 28 Jan 2025 09:28:32 GMT, Joachim Kern <jkern at openjdk.org> wrote:
>> Beginning with AIX 7.3 TL1 mmap() supports 64K memory pages. As an enhancement, during the initialization of the VM the availability of this new feature is examined. If the 64K pages are supported the VM will use mmap() with 64K pages instead of shmget()/shmat() with 64K pages due to the bad 256M alignment of shmget()/shmat().
>>
>> In this downport to jdk21 we want to support the new AIX 7.3 TL1 feature, but with some differences explained here:
>> - `static void query_multipage_support()` in `src/hotspot/os/aix/os_aix.cpp`
>> The structure of the function was changed identically in head and jdk21. Because jdk21 beforehand used trcVerbose(...) and head beforehand used log_warning(pagesize)(...) this seems to be a difference, but I just kept the tracing functions as the were before.
>>
>> - `src/hotspot/share/memory/virtualspace.cpp`
>> Adding the use of `os::Aix::supports_64K_mmap_pages()` introduces the dependency to the header `src/hotspot/os/aix/os_aix.hpp`. In head this header was included with `#include "runtime/os.inline.hpp"` beforehand by dependant code added after jdk21. Therefore I have to include `#include "runtime/os.inline.hpp" `explicitely in virtualspace.cpp.
>>
>> - `src/hotspot/share/runtime/os.cpp`
>> Function `char* os::attempt_reserve_memory_between()` does not exist in jdk21, so I do not have to port the adoptions of head there.
>>
>> - `TEST_VM(os, aix_reserve_at_non_shmlba_aligned_address)` moved from `test/hotspot/gtest/runtime/test_os.cpp` to `test/hotspot/gtest/runtime/test_os_aix.cpp`
>> This test function does not exist in jdk21, so there is nothing to move.
>
> Joachim Kern has updated the pull request incrementally with one additional commit since the last revision:
>
> additionally headers
LGTM.
src/hotspot/share/memory/virtualspace.cpp line 35:
> 33: #include "runtime/java.hpp"
> 34: #include "runtime/os.hpp"
> 35: #include "runtime/os.inline.hpp"
Note that including `os.hpp` is no longer needed when you include `os.inline.hpp`.
-------------
Marked as reviewed by mdoerr (Reviewer).
PR Review: https://git.openjdk.org/jdk21u-dev/pull/1362#pullrequestreview-2590785718
PR Review Comment: https://git.openjdk.org/jdk21u-dev/pull/1362#discussion_r1939893685
More information about the jdk-updates-dev
mailing list