Re: [PATCHES] 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-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Reorganization of spinlock defines
Date: 2003-09-12 15:41:04
Message-ID: 200309121541.h8CFf4923283@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:
> > Does this say that Darwin on something other than PPC doesn't have
> > spinlocks? Is that going to hit a spinlock define, or fall through?
>
> It says that darwin.h is broken, and always has been, for non-PPC
> builds. Since there is no non-PPC Darwin (afaik), this is cosmetic.
> Keep in mind that the argument here is exactly over whether we should
> be fixing cosmetic issues right now.
>
> > Also, look at NEED_I386_TAS_ASM: It is used only by SCO compilers,
> > though it is defined for all Intel platforms. The s_lock.h gcc test
> > already tests __i386__. It really doesn't do anything on non-SCO
> > compilers, and non-SCO compilers are better testing for i386 anyway.
>
> <shrug> Again, we were asking you what it would take to fix
> Opteron/Itanium. Not to clean up cosmetic issues that have never caused
> any problem before.
>
> > Let me also add that some slock_t typedef's didn't match the assembly
> > code. For example, __alpha_ on netbsd.h had slock_t defined as
> > "unsigned long", while in linux.h it was "long int". I assumed the
> > alpha was the correct one, but clearly they should be the same because
> > they use the same assembly code.
>
> As long as it's the right width, whether the code thinks it's signed or
> not isn't gonna matter. We don't do any comparisons on spinlocks,
> except maybe zero/notzero.

My point is we don't know how many of these platforms are already using
non-spinlock code, but we will find out in 7.4, and we should find out
because those folks are getting poor performance.

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-12 15:43:35 Re: [PATCHES] Reorganization of spinlock defines
Previous Message Tom Lane 2003-09-12 15:38:31 Re: [PATCHES] Reorganization of spinlock defines

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-09-12 15:43:35 Re: [PATCHES] Reorganization of spinlock defines
Previous Message Tom Lane 2003-09-12 15:38:31 Re: [PATCHES] Reorganization of spinlock defines