Re: [HACKERS] Reorganization of spinlock defines

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Reorganization of spinlock defines
Date: 2003-09-12 03:33:49
Message-ID: 200309120333.h8C3Xn127277@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Yes, we could do just the configure warning, then plaster tests into the
> > port files to try to hit all the opteron/itanium cases. I am a little
> > concerned that this might throw up a bunch of problem cases that we will
> > patching for a while.
>
> Probably so --- but we'd only be breaking new platforms that people are
> starting to use, not old ones that might not be getting tested
> regularly.

Looking at the code, I wonder if we already have folks not using
spinlocks, and not even knowing it. I don't think problem reports will
be limited to new platforms.

> Understand that I'm not dead set against applying this patch for 7.4.
> (On a code-cleanliness point of view I favor it.) What I want is some
> open discussion about the risks and benefits before we decide.

Sure, and I am not pushing the patch. I am just saying it would have
been ideal a few weeks ago --- I am not sure if we are worse off with or
without it.

I just learned from Larry that Unixware defines intel as i386, not
__i386 or __i386__, at least of the native SCO compiler that he uses.

What the code used to do is define NEED_I386_TAS_ASM unconditionally on
some platforms (negating the need to test for a compiler symbol) or test
for each platform compiler symbol (and not test all possible ways it
could be specified), like FreeBSD did. That's why things are so messy.
I am going to test for __cpu, __cpu__, and cpu on non-gcc compiler for
consistency. It is only done in one place in the patch, so that should
be good.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-12 03:42:53 Re: [HACKERS] Reorganization of spinlock defines
Previous Message Tom Lane 2003-09-12 03:29:16 Re: [HACKERS] Reorganization of spinlock defines

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-09-12 03:42:53 Re: [HACKERS] Reorganization of spinlock defines
Previous Message Tom Lane 2003-09-12 03:29:16 Re: [HACKERS] Reorganization of spinlock defines