Re: [PATCHES] Reorganization of spinlock defines - Mailing list pgsql-hackers

From Manfred Spraul
Subject Re: [PATCHES] Reorganization of spinlock defines
Date
Msg-id 3F62372F.7080901@colorfullife.com
Whole thread Raw
In response to Re: [PATCHES] Reorganization of spinlock defines  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [PATCHES] Reorganization of spinlock defines
Re: [PATCHES] Reorganization of spinlock defines
List pgsql-hackers
Bruce Momjian wrote:

>Tom Lane wrote:
>  
>
>>Bruce Momjian <pgman@candle.pha.pa.us> writes:
>>    
>>
>>>He is uncomfortable with the port/*.h changes at this point, so it seems
>>>I am going to have to add Itanium/Opteron tests to most of those files.
>>>      
>>>
>>Why don't you try to put together a proposed patch of that kind, and
>>then we can look to see how big and ugly it is compared to the other?
>>If the alternative is shown to be really messy, that would sway my
>>opinion, maybe Marc's too.
>>    
>>
>
>OK, here is an Opteron/Itanium patch that might work.  I say "might"
>because I don't have a lot of confidence in the current spinlock
>detection code.  There is an uncoupling between the definition of
>HAS_TEST_AND_SET, the data type used by slock_t, and the assembler code.
>  
>
Is the Itanium tas implementation correct? I think it should be 
xchg4.aqv instead of just xchg4 - as far as I know a normal atomic 
exchange is is not a memory barrier on Itanium. At least the Linux 
kernel version contains "cmpxchg4.aqv".

--   Manfred




pgsql-hackers by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Another small bug (pg_autovacuum)
Next
From: Carlos Guzman Alvarez
Date:
Subject: [ANN] PGSqlClient 1.0 Beta 1 released