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

Thomas Stuefe stuefe at openjdk.org
Tue Mar 5 10:49:46 UTC 2024


On Mon, 4 Mar 2024 10:13:13 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).
> 
> Because my first proposal (PR 17708) of introducing a new method os::vm_shm_allocation_granularity() in the shared hotspot code was rejected I now encapsulate the difference in ifdef AIX brackets.

I don't think we need to cater to the 4K page mode. It was originally added for AIX versions that don't support 64K pages. AIX 4.xx IIRC. The need for it should be long gone.

I am not doing AIX coding anymore, but my advice would be to simplify and require 64k pages always. WRT this change, the 4K page handling is certainly not needed. Just hardcode to SHMLBA. Or 256M, whatever causes the least amount of ifdefs.

Other than that, please slim the fix down to the necessary. The many copypasted sections are really not pretty.

The only really needed parts are the one in os::reserve_memory_inbetween. This is a small issue, let's keep the patch small and confined.

src/hotspot/share/memory/virtualspace.cpp line 529:

> 527: #else
> 528:       os::vm_allocation_granularity();
> 529: #endif

Unnecessary for the fix. And the old code does basically the same, only less verbose.

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

PR Review: https://git.openjdk.org/jdk/pull/18105#pullrequestreview-1916522841
PR Review Comment: https://git.openjdk.org/jdk/pull/18105#discussion_r1512600944


More information about the hotspot-runtime-dev mailing list