Re: AIX support - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: AIX support
Date
Msg-id 7751f9c5-e2e6-4252-a9fa-14b3e78ddec9@iki.fi
Whole thread Raw
In response to Re: AIX support  (Sriram RK <sriram.rk@outlook.com>)
Responses Re: AIX support
RE: AIX support
List pgsql-hackers
On 11/09/2024 15:38, Srirama Kucherlapati wrote:
>> I still don't understand. We have Linux powerpc systems running
>> happily in the buildfarm. They are happy with the current spinlock
>> implementation. Why is this needed? What happens without it?
> 
> Not sure, by the time the below commits were made if there was a 
> consideration to use the gcc routines.

The PPC asm code was originally written in 2002, and the first use of 
__sync_lock_test_and_set(), for ARM, appeared in 2012. The commit that 
made __sync_lock_test_and_set() be chosen automatically for platforms 
that don't specify anything else was added in 2022.

> I tried to replace the AIX asm (under__ppc__ macro) with the gcc
> routine __sync_lock_test_and_set(), and all the buildfarm tests
> passed. Attached patch and the buildfarm output. Please let me know
> your feedback.
Ok, if we don't need the assembler code at all, that's good. A patch to 
introduce AIX support should not change it for non-AIX powerpc systems 
though. That might be a good change, but would need to be justified 
separately, e.g.  by some performance testing, and should be a separate 
patch.

If you make no changes to s_lock.h at all, will it work? Why not?

You said earlier:

> I mean this part of the code is needed as this is specific to AIX kernel memory
> operation which is different from __sync_lock_test_and_set().
> 
> I would like to mention that the changes made in src/include/storage/s_lock.h
> are pretty much required and need to be operated in assemble specific to IBM
> Power architecture.

Was that earlier statement incorrect? Is the manual wrong or outdated or 
not applicable to us?


Moving on..

Do you still need mkldexport.sh? Surely there's a better way to do that 
in year 2024. Some quick googling says there's a '-bexpall' option to 
'ld', which kind of sounds like what we want. Will that work? How do 
other programs do this?

-- 
Heikki Linnakangas
Neon (https://neon.tech)




pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible
Next
From: Matthias van de Meent
Date:
Subject: Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch