From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Srirama Kucherlapati <sriram(dot)rk(at)in(dot)ibm(dot)com>, Heikki Linnakangas <hlinnaka(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Noah Misch <noah(at)leadboat(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "tvk1271(at)gmail(dot)com" <tvk1271(at)gmail(dot)com>, "postgres-ibm-aix(at)wwpdl(dot)vnet(dot)ibm(dot)com" <postgres-ibm-aix(at)wwpdl(dot)vnet(dot)ibm(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us> |
Subject: | Re: AIX support |
Date: | 2024-09-11 21:57:33 |
Message-ID: | 7751f9c5-e2e6-4252-a9fa-14b3e78ddec9@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Sami Imseih | 2024-09-11 22:02:07 | Re: query_id, pg_stat_activity, extended query protocol |
Previous Message | Jacob Champion | 2024-09-11 21:29:49 | Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible |