Re: got Postgresql working on FreeBSD-alpha

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: got Postgresql working on FreeBSD-alpha
Date: 2000-11-14 23:06:33
Message-ID: 20001114150633.C11449@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

It's updated and moved:

http://people.freebsd.org/~alfred/pgsql/port-alpha2.diff

Responses below:

* Peter Eisentraut <peter_e(at)gmx(dot)net> [001114 14:10] wrote:
> Alfred Perlstein writes:
>
> > http://people.freebsd.org/~alfred/pgsql/port-alpha.diff
> >
> > Make pgsql compile on FreeBSD-alpha.
> >
> > Remove -m486 compile args for FreeBSD-i386.
> >
> > Make the port use the TEST_AND_SET for alpha and i386 on FreeBSD.
> >
> > Fix a lot of bogus string formats for outputting pointers (cast to int
> > and %u/%x replaced with no cast and %p), and 'Size'(size_t) are now
> > cast to 'unsigned long' and output with %lu/
> >
> > Remove an unused variable.
>
> That variable *is* used, if you compile with -DXLOG, which will be the
> default eventually.

Ok fixed. (variable is #ifdef XLOG)

> Also:
>
> !case $host_cpu in
> ! alpha*) CFLAGS="$CFLAGS -O";;
> ! i386*) CFLAGS="$CFLAGS -O2";;
> ! esac
>
> s/i386/i.86/, or better s/i386//.

FreeBSD always reports i386. -O2 is not appropriate for arches other
than i386 because of potential gcc bugs.

> Trouble with -O2? Being conservative?

Yes, possible gcc bugs under alpha.

~ % gcc -O2 t.c
cc1: warning:
***
*** The -O2 flag TRIGGERS KNOWN OPTIMIZER BUGS ON THIS PLATFORM
***

.(14:28:46)(alfred(at)beast(dot)freebsd(dot)org)
~ % uname -a
FreeBSD beast.freebsd.org 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sat Nov 11 14:27:30 PST 2000 root(at)beast(dot)freebsd(dot)org:/usr/src/sys/compile/BEAST alpha

fear. :)

> About the regression tests: Apparently you're picking up the wrong
> "expected" files. I can't make out why offhand, though. Modulo that, the
> inet failure looks to be the only real trouble.

Yes, can you point to at the general location of that code? I'd
like to see if it's a FreeBSD bug, FreeBSD-alpha bug, Postgresql
bug or Postgresql-alpha bug or any combination thereof. :)

I've updated the patch again, I've changed the CFLAGS to be -O on
everything but i386 and #ifdef'd the variable based on XLOG.

I've also run regression on i386 since I've posted the patch and
the results are consistant with i386 without my patch.

Question, how much of an impact is using test and set over using
system semaphores? Would it be worth it to patch 7.0.x for alpha
and using hardware spinlocks rather than kernel mutexes?

I'd like to give my FreeBSD boxes running 7.0.3 a little boost if
possible...

--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
"I have the heart of a child; I keep it in a jar on my desk."

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Chih-Chang Hsieh 2000-11-15 01:16:58 Re: [PATCHES] A Patch for MIC to EUC_TW code converting inmbsupport
Previous Message Peter Eisentraut 2000-11-14 22:06:22 Re: got Postgresql working on FreeBSD-alpha