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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers