RFR: JDK-8322943: runtime/CompressedOops/CompressedClassPointers.java fails on AIX [v2]

Thomas Stuefe stuefe at openjdk.org
Thu Feb 15 14:31:53 UTC 2024


On Wed, 14 Feb 2024 16:45:05 GMT, Joachim Kern <jkern at openjdk.org> wrote:

>> Even after recent fixes like
>> https://bugs.openjdk.org/browse/JDK-8305765
>> the test runtime/CompressedOops/CompressedClassPointers.java fails on AIX.
>> 
>> This error results from the fact, that on AIX the shmat() allocation granularity is 256MB instead of the standard Pagesize (4KB or 64KB).
>> 
>> As a solution we introduce a new method  `os::vm_shm_allocation_granularity()`, which on all platforms except AIX returns the same value as  `os::vm_allocation_granularity()`, but on AIX it returns (in the apropriate cases) 256MB.
>> 
>> This new getter is used at all needed places instead of  `os::vm_allocation_granularity()`.
>
> Joachim Kern has updated the pull request incrementally with one additional commit since the last revision:
> 
>   following Goetz objections

BTW, just a zoomed-back reminder:

all of this complexity is only because we don't use mmap on AIX for os::reserve_memory. 

We don't use it, because mmap cannot be used with 64K pages. Or can it? We wrote the code originally 20 (?) years ago when the only way to get 64K pages was via shmget. Maybe that changed. It would be good if someone could check if this is still the case. Because using shmget instead of mmap causes a long tail of follow-up problems. mmap is so much easier.

Just a thought. Maybe we could throw away all the shmget handling nowadays, who knows.

Cheers, Thomas

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

PR Comment: https://git.openjdk.org/jdk/pull/17708#issuecomment-1946207527


More information about the hotspot-runtime-dev mailing list