Re: xlc atomics - Mailing list pgsql-hackers

From Andres Freund
Subject Re: xlc atomics
Date
Msg-id 20160215173342.GC25464@awork2.anarazel.de
Whole thread Raw
In response to Re: xlc atomics  (Noah Misch <noah@leadboat.com>)
Responses Re: xlc atomics
List pgsql-hackers
On 2016-02-15 12:11:29 -0500, Noah Misch wrote:
> These suggested OidGenLock wasn't doing its job.  I've seen similar symptoms
> around WALInsertLocks with "IBM XL C/C++ for Linux, V13.1.2 (5725-C73,
> 5765-J08)" for ppc64le.  The problem is generic-xlc.h
> pg_atomic_compare_exchange_u32_impl() issuing __isync() before
> __compare_and_swap().  __isync() shall follow __compare_and_swap(); see our
> own s_lock.h, its references, and other projects' usage:

Ugh. You're right! It's about not moving code before the stwcx...

Do you want to add the new test (no objection, curious), or is that more
for testing?

Greetings,

Andres



pgsql-hackers by date:

Previous
From: Filip Rembiałkowski
Date:
Subject: Re: proposal: make NOTIFY list de-duplication optional
Next
From: Andres Freund
Date:
Subject: Re: [PATCH] Code refactoring related to -fsanitize=use-after-scope