test-and-set for s390x and powerpc64
test-and-set for s390x and powerpc64
Hi, the attached patches provide test-and-set assembler code for s390x (64bit) and ppc64. The s390x patch changes the existing implementation to a more efficient version (according to the IBM guy who wrote it), that works on both s390 architectures. It also changes the -fpic compiler flag to -fPIC which is needed for some Linux platforms, and AFAIK doesn't hurt on the others. cu Reinhard
Re: test-and-set for s390x and powerpc64
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Reinhard Max writes: > the attached patches provide test-and-set assembler code for s390x > (64bit) and ppc64. Why do we need that ppc64 code? It appears identical to the ppc code (except for missing isync, which means it's broken on multi-CPU boxes). > It also changes the -fpic compiler flag to > -fPIC which is needed for some Linux platforms, and AFAIK doesn't hurt > on the others. Evidence? regards, tom lane
Re: test-and-set for s390x and powerpc64
От:
Reinhard Max <max@suse.de>
Дата:
On Thu, 31 Oct 2002 at 12:17, Tom Lane wrote: > Reinhard Max writes: > > the attached patches provide test-and-set assembler code for s390x > > (64bit) and ppc64. > > Why do we need that ppc64 code? It appears identical to the ppc > code (except for missing isync, which means it's broken on multi-CPU > boxes). I'll re-check that with the ppc architecture guy here. > > It also changes the -fpic compiler flag to -fPIC which is needed > > for some Linux platforms, and AFAIK doesn't hurt on the others. > > Evidence? Shared libraries don't work on the S/390 platforms unless compiled with -fPIC. The lowercase -fpic is not sufficient there. I don't remember the details, but the architecture gurus told me that -fPIC is strictly needed. Here at SuSE all shared libs on all platforms get built with -fPIC . cu Reinhard
Re: test-and-set for s390x and powerpc64
От:
Reinhard Max <max@suse.de>
Дата:
On Thu, 31 Oct 2002 at 18:23, Reinhard Max wrote:
> On Thu, 31 Oct 2002 at 12:17, Tom Lane wrote:
>
> > Why do we need that ppc64 code? It appears identical to the ppc
> > code
The difference is the symbol name ("tas" vs. ".tas") which is needed
because of the different ABIs of ppc and ppc64.
> > (except for missing isync, which means it's broken on multi-CPU
> > boxes).
This was indeed a bug.
> I'll re-check that with the ppc architecture guy here.
... he is now about to write an inlined version that can go into
s_lock.h . I'll send the new patch later on...
cu
Reinhard
Re: test-and-set for s390x and powerpc64
On Tue, 5 Nov 2002 at 09:54, Reinhard Max wrote: > > I'll re-check that with the ppc architecture guy here. > > ... he is now about to write an inlined version that can go into > s_lock.h . I'll send the new patch later on... OK, here it comes: An inlined version of tas(), that works for both, powerpc and powerpc64. The patch is against 7.3b5 and passes the test suite on both architectures. cu Reinhard
Re: test-and-set for s390x and powerpc64
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Too late for 7.3, especially because it affects our existing PPC tas code. This has been saved for the 7.4 release: http:/momjian.postgresql.org/cgi-bin/pgpatches2 --------------------------------------------------------------------------- Reinhard Max wrote: > On Tue, 5 Nov 2002 at 09:54, Reinhard Max wrote: > > > > I'll re-check that with the ppc architecture guy here. > > > > ... he is now about to write an inlined version that can go into > > s_lock.h . I'll send the new patch later on... > > OK, here it comes: > > An inlined version of tas(), that works for both, powerpc and > powerpc64. The patch is against 7.3b5 and passes the test suite on > both architectures. > > cu > Reinhard Content-Description: [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Re: test-and-set for s390x and powerpc64
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Patch applied to 7.4. Sorry we couldn't get it into 7.3. (Too risky.) Thanks. --------------------------------------------------------------------------- Reinhard Max wrote: > On Tue, 5 Nov 2002 at 09:54, Reinhard Max wrote: > > > > I'll re-check that with the ppc architecture guy here. > > > > ... he is now about to write an inlined version that can go into > > s_lock.h . I'll send the new patch later on... > > OK, here it comes: > > An inlined version of tas(), that works for both, powerpc and > powerpc64. The patch is against 7.3b5 and passes the test suite on > both architectures. > > cu > Reinhard Content-Description: [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073