Thread: Spinlock support for linux-hppa?

Spinlock support for linux-hppa?

From
Oliver Elphick
Date:
What is needed to provide spinlock support for linux on hppa?

make[5]: Entering directory `/build/buildd/postgresql-7.4.1/build-tree/postgresql-7.4.1/src/backend/access/transam'
...
hppa-linux-gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations -pipe
-I../../../../src/include-D_GNU_SOURCE  -I/usr/include/tcl8.4 -I/usr/lib/R/include  -c -o xlog.o xlog.c
 
In file included from ../../../../src/include/storage/spin.h:50,                from xlog.c:37:
../../../../src/include/storage/s_lock.h:543:2: #error PostgreSQL does not have native spinlock support on this
platform.To continue the compilation, rerun configure using --disable-spinlocks. However, performance will be poor.
Pleasereport this to pgsql-bugs@postgresql.org.
 
make[5]: *** [xlog.o] Error 1

Full build log at
http://buildd.debian.org/fetch.php?&pkg=postgresql&ver=7.4.1-1&arch=hppa&stamp=1072828455&file=log&as=raw
-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "The LORD shall preserve thy going out and thy coming      in from this time
forth,and even for evermore."                                         Psalms 121:8 
 



Re: Spinlock support for linux-hppa?

From
Oliver Elphick
Date:
On Thu, 2004-01-01 at 03:22, Oliver Elphick wrote:
> What is needed to provide spinlock support for linux on hppa?

I should add that 7.3.4 built OK.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "The LORD shall preserve thy going out and thy coming      in from this time
forth,and even for evermore."                                         Psalms 121:8 
 



Re: Spinlock support for linux-hppa?

From
Tom Lane
Date:
Oliver Elphick <olly@lfix.co.uk> writes:
> On Thu, 2004-01-01 at 03:22, Oliver Elphick wrote:
>> What is needed to provide spinlock support for linux on hppa?

Possibly nothing --- can you try CVS tip?  Bruce has already committed
his patch to decouple CPU and OS assumptions there, and I changed the
TAS code to be inline for gcc.  AFAICS it should just work.

> I should add that 7.3.4 built OK.

For sufficiently small values of OK, perhaps so.  We didn't complain
about not having spinlocks then.
        regards, tom lane


Re: Spinlock support for linux-hppa?

From
Oliver Elphick
Date:
On Thu, 2004-01-01 at 17:58, Tom Lane wrote:
> Oliver Elphick <olly@lfix.co.uk> writes:
> > On Thu, 2004-01-01 at 03:22, Oliver Elphick wrote:
> >> What is needed to provide spinlock support for linux on hppa?
> 
> Possibly nothing --- can you try CVS tip?  Bruce has already committed
> his patch to decouple CPU and OS assumptions there, and I changed the
> TAS code to be inline for gcc.  AFAICS it should just work.

I can't very easily get cvs tip built on linus-hppa, because I couldn't
make a package of that except for experimental, but experimental doesn't
get processed by the autobuilders.

I saw the changes to s_lock.h, but I couldn't at first sight see how to
alter 7.4.1 to incorporate them, because they coincided with a file
reorganisation.  My object is to get 7.4.1 working on all the Debian
architectures.  However, I only have i386 machines; for the rest I have
to rely on the autobuilders, which makes the task of debugging rather
long-winded and is likely to involve a series of faulty packages till I
get it right.  So is there any possibility of a backpatch for 7.4.1? or
tell me which files in 7.4.1 should receive the tas assembler for gcc. 
Can I take it that your words above imply that the assembler code is the
same for gcc on all architectures?

Is there any way of finding out from cvs all the files affected by a
patch?   Using the web interface to view changes to one file, I don't
see how to find out what else changed at the same time.

Thanks.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "The LORD shall preserve thy going out and thy coming      in from this time
forth,and even for evermore."                                         Psalms 121:8 
 



Re: Spinlock support for linux-hppa?

From
Tom Lane
Date:
Oliver Elphick <olly@lfix.co.uk> writes:
> I saw the changes to s_lock.h, but I couldn't at first sight see how to
> alter 7.4.1 to incorporate them, because they coincided with a file
> reorganisation.

That's right.  The change depends on Bruce's reorganization of the
spinlock configuration mechanism, which we agreed not to apply to 7.4
because of the risk of breaking things (we were already well into the
7.4 beta test cycle at that time).  We are not going to revisit that
decision at this point --- it's not reasonable to risk breaking other
platforms to add one more supported platform in a stable branch.  The
reorganization has to go through a port testing cycle before it can be
considered suitable for a production release.

> My object is to get 7.4.1 working on all the Debian architectures.

I'd have been more willing to buy into that goal if you'd been working
on it during the 7.4 beta test cycle.  I gather from what you are saying
that you couldn't, because Debian provides essentially no infrastructure
for testing package portability in advance of official releases.  That
seems like a rather serious misjudgement on their part ... maybe you
could lobby to get it corrected?

I think it might be possible to develop a localized patch for 7.4 that
only affects linux-hppa and doesn't risk breaking anything else: copy
the slock_t definition for hppa from hpux.h into linux.h and add the
inline'd version of hppa tas() from CVS tip into s_lock.h.  But I'm not
particularly interested in working on it at two removes from where any
testing could get done.
        regards, tom lane


Re: Spinlock support for linux-hppa?

From
Bruce Momjian
Date:
Tom Lane wrote:
> I think it might be possible to develop a localized patch for 7.4 that
> only affects linux-hppa and doesn't risk breaking anything else: copy
> the slock_t definition for hppa from hpux.h into linux.h and add the
> inline'd version of hppa tas() from CVS tip into s_lock.h.  But I'm not
> particularly interested in working on it at two removes from where any
> testing could get done.

I think he also has to modify src/include/port/linux.h to support the HP
processor.

--  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,
Pennsylvania19073
 


Re: Spinlock support for linux-hppa?

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> ... copy the slock_t definition for hppa from hpux.h into linux.h ...

> I think he also has to modify src/include/port/linux.h to support the HP
> processor.

That's what I said, I thought.
        regards, tom lane


Re: Spinlock support for linux-hppa?

From
Bruce Momjian
Date:
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom Lane wrote:
> >> ... copy the slock_t definition for hppa from hpux.h into linux.h ...
> 
> > I think he also has to modify src/include/port/linux.h to support the HP
> > processor.
> 
> That's what I said, I thought.

Oh, I saw slock_t definition and thought s_lock.h.

--  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,
Pennsylvania19073
 


Re: Spinlock support for linux-hppa?

From
Oliver Elphick
Date:
On Thu, 2004-01-01 at 22:20, Tom Lane wrote:
> > My object is to get 7.4.1 working on all the Debian architectures.
> 
> I'd have been more willing to buy into that goal if you'd been working
> on it during the 7.4 beta test cycle.  I gather from what you are saying
> that you couldn't, because Debian provides essentially no infrastructure
> for testing package portability in advance of official releases.  That
> seems like a rather serious misjudgement on their part ... maybe you
> could lobby to get it corrected?

It isn't as bad as that normally.  If I put a package in unstable, it
will (in the absence of a later upgrade) eventually make its way into a
stable release.  Therefore it would be inappropriate for me to put
anything less than a later beta release of PostgreSQL there.  This time,
there was a long-standing blockage in moving from unstable to testing
caused by the interaction of several fundamental packages (such as libc6
and perl) with release-critical bugs, so we were asked not to do uploads
that might compound the problem by (potentially) introducing new RC
bugs.  Therefore all the 7.4 releases went to experimental instead.  The
logjam only cleared in time for me to put 7.4.1 in unstable. 
Unfortunately, this meant that packages didn't get built for other
architectures unless someone using those architectures did a build from
source, which apparently didn't happen with hppa.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "Verily, verily, I say unto you, He that heareth my      word, and believeth
onhim that sent me, hath       everlasting life, and shall not come into       condemnation; but is passed from death
untolife."                      John 5:24 
 



Re: Spinlock support for linux-hppa?

From
Peter Eisentraut
Date:
Oliver Elphick wrote:
> I can't very easily get cvs tip built on linus-hppa, because I
> couldn't make a package of that except for experimental, but
> experimental doesn't get processed by the autobuilders.

Time to break out the old configure; make; make install...