Tom, thank you for your advise.

On 2012/01/01, at 3:39, Tom Lane wrote:

> What I suggest we should do about this is provide an overridable option
> in pg_config_manual.h, along the lines of
> 
>       #if defined(__ppc64__) || defined(__powerpc64__)
>       #define USE_PPC_LWARX_MUTEX_HINT
>       #endif
> 
> and then test that symbol in s_lock.h.  This will provide an escape
> hatch for anyone who doesn't want the decision tied to 64-bit-ness,
> while still enabling the option automatically for the majority of
> people who could use it.

Fair enough.
I recreated the patch as you advised.

Attachment: ppc-TAS_SPIN-20120101.diff
Description: Binary data

> BTW, while reading the ISA document I couldn't help noticing that LWARX
> is clearly specified to operate on 4-byte quantities (there's LDARX if
> you want to use 8-byte).  Which seems to mean that this bit in s_lock.h
> just represents bogus waste of space:
> 
> #if defined(__ppc64__) || defined(__powerpc64__)
> typedef unsigned long slock_t;
> #else
> typedef unsigned int slock_t;
> #endif
> 
> Shouldn't we just make slock_t be "int" for both PPC and PPC64?

I'd like it to be untouched for this TAS_SPIN for powerpc
discussion, since it seems it remainds like this for several
years and maybe it needs some more careful consideration
especially for sign extension…

Regards,
Manabu Ori
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to