Re: spinlocks on HP-UX - Mailing list pgsql-hackers

From Tom Lane
Subject Re: spinlocks on HP-UX
Date
Msg-id 29635.1325197576@sss.pgh.pa.us
Whole thread Raw
In response to Re: spinlocks on HP-UX  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> The Linux kernel does this (arch/powerpc/include/asm/ppc-opcode.h):

Yeah, I was looking at that too.

> We can't copy-paste code from Linux directly, and I'm not sure I like 
> that particular phrasing of the macro, but perhaps we should steal the 
> idea and only use the hint on 64-bit PowerPC processors?

The info that I've found says that the hint exists beginning in POWER6,
and there were certainly 64-bit Power machines before that.  However,
it might be that the only machines that actually spit up on the hint bit
(rather than ignore it) were 32-bit, in which case this would be a
usable heuristic.  Not sure how we can research that ... do we want to
just assume the kernel guys know what they're doing?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: failed regress test
Next
From: "chris r."
Date:
Subject: SEGFAULT on SELECT * FROM view