Re: anole: assorted stability problems

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: anole: assorted stability problems
Date: 2015-06-29 13:00:46
Message-ID: 20150629130046.GG20882@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-06-29 13:11:57 Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
Previous Message Merlin Moncure 2015-06-29 12:45:38 Re: proposal: condition blocks in psql