From: | dg(at)illustra(dot)com (David Gould) |
---|---|
To: | winter(at)jurai(dot)net (Matthew N(dot) Dodd) |
Cc: | maillist(at)candle(dot)pha(dot)pa(dot)us, rkirkpat(at)nag(dot)cs(dot)colorado(dot)edu, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Re: [PATCHES] Try again: S_LOCK reduced contention |
Date: | 1998-06-10 07:56:48 |
Message-ID: | 9806100756.AA01222@hawk.illustra.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Matthew N. Dodd writes:
> On Wed, 10 Jun 1998, Bruce Momjian wrote:
> > Quite and analysis. I want to comment on the code more, but I just want
> > to point out now that many of our i386 platforms are not GNU. I think
> > we have to use macros. I can't think of any GNU-specific code in the
> > source tree at this point, and I don't think it makes sense add it now
> > just to make the code look a litter cleaner.
>
> Indeed. Those of use who have thousand dollar SunPro compilers thank you.
>
> (can you say progressive optomizer?)
^^^^^^^^^ uhhh, no. ;-)
Hmmmm, looking at the original code, non-GCC Sparc makes a function call to
the tas() routine which is coded as asm. I have not in fact changed it.
As I understand your comment, you wish this to be a macro.
The code is:
#if defined(NEED_SPARC_TAS_ASM)
/*
* sparc machines not using gcc
*/
static void tas_dummy() /* really means: extern int tas(slock_t *lock); */
{
asm(".seg \"data\"");
asm(".seg \"text\"");
asm("_tas:");
/*
* Sparc atomic test and set (sparc calls it "atomic load-store")
*/
asm("ldstub [%r8], %r8");
asm("retl");
asm("nop");
}
#endif /* NEED_SPARC_TAS_ASM */
I doubt there are any major performance gains to be had here, but I would
be interested to learn otherwise. I don't have access to a Sparc machine
that I can use for this, so if anyone cares to test this implementation and
any others they can think of please post the results.
But I think perhaps we are micro-optimizing here. I only bothered to do
all the i386 flavors because Bruce had some gprof output that suggested
we had a problem (we didn't), and then I just got kinda interested in the
experiment itself.
-dg
David Gould dg(at)illustra(dot)com 510.628.3783 or 510.305.9468
Informix Software (No, really) 300 Lakeside Drive Oakland, CA 94612
"A week of coding can sometimes save an hour of thought."
From | Date | Subject | |
---|---|---|---|
Next Message | Jose' Soares Da Silva | 1998-06-10 09:27:01 | Re: [INTERFACES] Re: M$-Access'97 and TIMESTAMPs |
Previous Message | Matthew N. Dodd | 1998-06-10 07:24:50 | Re: [HACKERS] Re: [PATCHES] Try again: S_LOCK reduced contention |