Re: anole: assorted stability problems - Mailing list pgsql-hackers

From Andres Freund
Subject Re: anole: assorted stability problems
Date
Msg-id 20150629130046.GG20882@alap3.anarazel.de
Whole thread Raw
In response to Re: anole: assorted stability problems  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 2015-06-29 12:11:08 +0200, Andres Freund wrote:
> On 2015-06-29 00:42:53 -0400, Tom Lane wrote:
> > #define S_UNLOCK(lock)    \
> >     do { _Asm_sched_fence(); (*(lock)) = 0; } while (0)
> 
> Robert, how did you choose that? Isn't _Asm_sched_fence just a compiler
> barrier? Shouldn't this be a _Asm_mf()?

I've pushed a patch the _sched_fence with _mf. That's what we use in the
atomics code as well. I did reread
http://h21007.www2.hp.com/portal/download/files/unprot/Itanium/inline_assem_ERS.pdf
and I do think _Asm_mf is the correct thing.

What I did not change was the mask used for serialization - the default
0x3D3D (c.f. page 23) should be correct, even though slightly
suboptimal.

Andres



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: proposal: condition blocks in psql
Next
From: Michael Paquier
Date:
Subject: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.