Skip site navigation (1) Skip section navigation (2)

spinlocks on powerpc

From: Manabu Ori <manabu(dot)ori(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Tatsuo Ishii <ishii(at)postgresql(dot)org>, robertmhaas(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: spinlocks on powerpc
Date: 2011-12-30 05:47:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
2011/12/30 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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?

I'm a bit confused and might miss the point, but...

If we can decide whether to use the hint operand when we build
postgres, I think it's better to check if we can compile and run
a sample code with lwarx hint operand than to refer to some
arbitrary defines, such as FOO_PPC64 or something.

I still wonder when to judge the hint availability, compile time
or runtime.
I don't have any idea how to decide that on runtime, though.

I changed the subject since it's no longer related to HPUX.

Manabu Ori


pgsql-hackers by date

Next:From: Jean-Yves F. BarbierDate: 2011-12-30 06:34:28
Subject: Re: index refuses to build [finally SOLVED, but still some questions]
Previous:From: Tom LaneDate: 2011-12-30 03:40:19
Subject: Re: [NOVICE] index refuses to build

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group