RFR: 8236847: CDS archive with 4K alignment unusable on machines with 64k pages [v2]

Yumin Qi minqi at openjdk.java.net
Wed Feb 24 05:27:40 UTC 2021


On Wed, 24 Feb 2021 02:19:05 GMT, Nick Gasson <ngasson at openjdk.org> wrote:

>> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make 64K core region alignment only for specific platforms, also fixed comments as suggestions.
>
> src/hotspot/share/memory/metaspaceShared.cpp line 137:
> 
>> 135:     // (a) Linux/aarch64 can be configured to have either 4KB or 64KB page sizes.
>> 136:     // (b) macOS/x64 uses 4KB, but macOS/aarch64 uses 64KB (note: you can run a x64 JDK
>> 137:     //     on a M1-based MacBook using Rosetta).
> 
> I think the page size on Apple silicon Macs is 16KB not 64KB:
> 
> $ sysctl vm.pagesize
> vm.pagesize: 16384
> 
> This is also the value reported by `sun.misc.Unsafe.pageSize()` with a native JDK. Although some Linux distributions use a 64KB page size so rounding up is probably the right thing to do.

@nick-arm You are right --- on M1 it is 16384. Some linux-aarch64 configured 64K page size.

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

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


More information about the hotspot-runtime-dev mailing list