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

From Heikki Linnakangas
Subject Re: spinlocks on HP-UX
Date
Msg-id 4EFB799C.9080303@enterprisedb.com
Whole thread Raw
In response to Re: spinlocks on HP-UX  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: spinlocks on HP-UX  (Tatsuo Ishii <ishii@postgresql.org>)
Re: spinlocks on HP-UX  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 28.12.2011 14:03, Tatsuo Ishii wrote:
>>> With help from IBM Japan Ltd. we did some tests on a larger IBM
>>> machine than Tom Lane has used for his
>>> test(http://archives.postgresql.org/message-id/8292.1314641721@sss.pgh.pa.us).
>>> In his case it was IBM 8406-71Y, which has 8 physical cores and
>>> 4SMT(32 threadings). Ours is IBM Power 750 Express, which has 32
>>> physical cores and 4SMT(128 threadings), 256GB RAM.
>>>
>>> The test method was same as the one in the article above. The
>>> differences are OS(RHEL 6.1), gcc version (4.4.5) and shared buffer
>>> size(8GB).
>>>
>>> We tested 3 methods to enhance spin lock contention:
>>>
>>> 1) Add "hint" parameter to lwarx op which is usable POWER6 or later
>>>    architecure.
>>>
>>> 2) Add non-locked test in TAS()
>>>
>>> 3) #1 + #2
>>>
>>> We saw small performance enhancement with #1, larger one with #2 and
>>> even better with #1+#2.
>>
>> Hmm, so you added the non-locked test in TAS()?  Did you try adding it
>> just to TAS_SPIN()?  On Itanium, I found that it was slightly better
>> to do it only in TAS_SPIN() - i.e. in the contended case.
>
> Here is new patch using TAS_SPIN(), created by Manabu Ori from IBM
> Japan. Also this patch deal with older Power architectures which do
> not have "hint" argument of lwarx opcode.
>
> According to him, the patch resulted in much better performance stock
> git head.

Impressive results.

config/c-compiler.m4 doesn't seem like the right place for the configure 
test. Would there be any harm in setting the lwarx hint always; what 
would happen on older ppc processors that don't support it?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: age(xid) on hot standby
Next
From: Tatsuo Ishii
Date:
Subject: Re: spinlocks on HP-UX