[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Re: RFR: JDK-8322943: runtime/CompressedOops/CompressedClassPointers.java fails on AIX [v2]
From:       Thomas Stuefe <stuefe () openjdk ! org>
Date:       2024-02-27 7:32:46
Message-ID: c2ZycdjUO9HiRhS343iH5Z6V0K4pjTxrtDdzreemxjg=.e2b67bf8-7cfc-412c-87a2-43e116297c4f () github ! com
[Download RAW message or body]

On Tue, 27 Feb 2024 07:07:08 GMT, Joachim Kern <jkern@openjdk.org> wrote:

> > > I don't think a local test fix makes sense. After all it is a real issue that \
> > > os::attempt_reserve_memory_between() is using 4K alignment when we try to \
> > > allocate 256M shmat memory. We could do a temporary #ifdef AIX solution in that \
> > > function.
> > 
> > 
> > That is a good point. And a good compromise.
> > @JoKern65 can you try this:
> > ```
> > diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp
> > index 5d6c1fa69ca..34a708e1cdc 100644
> > --- a/src/hotspot/share/runtime/os.cpp
> > +++ b/src/hotspot/share/runtime/os.cpp
> > @@ -1892,7 +1892,15 @@ char* os::attempt_reserve_memory_between(char* min, char* \
> > max, size_t bytes, siz char* const absolute_max = (char*)(NOT_LP64(G * 3) \
> > LP64_ONLY(G * 128 * 1024)); char* const absolute_min = (char*) \
> > os::vm_min_address(); 
> > -  const size_t alignment_adjusted = MAX2(alignment, \
> > os::vm_allocation_granularity()); +  const size_t system_allocation_granularity =
> > +#ifdef AIX
> > +  // AIX is the only platform that uses System V shm for reserving virtual \
> > memory. As long as we +  // have not fixed os::vm_allocation_granularity(), \
> > hard-code allocation granularity of SHMLBA here. +      SHMLBA;
> > +#else
> > +      os::vm_allocation_granularity();
> > +#endif
> > +  const size_t alignment_adjusted = MAX2(alignment, \
> > system_allocation_granularity); ```
> 
> Yes, I will try that, but one question. Is the following code snipit an example for \
> the incorrect use of vm_allocation_granularity or did I understand something wrong? \
>  ```
> ReservedSpace::ReservedSpace(char* base, size_t size, size_t alignment, size_t \
> page_size, bool special, bool executable) : _fd_for_heap(-1) {
> assert((size % os::vm_allocation_granularity()) == 0,
> "size not allocation aligned");
> initialize_members(base, size, alignment, page_size, special, executable);
> }
> ```

I think so, yes.

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic