Re: [HACKERS] Fix performance of generic atomics - Mailing list pgsql-hackers

From Sokolov Yura
Subject Re: [HACKERS] Fix performance of generic atomics
Date
Msg-id f669e9078243a65b8d03c263401e5c75@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] Fix performance of generic atomics  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Fix performance of generic atomics
List pgsql-hackers
On 2017-09-06 15:56, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
>> On 5 September 2017 at 21:23, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Moreover, it matters which primitive you're testing, on which 
>>> platform,
>>> with which compiler, because we have a couple of layers of atomic ops
>>> implementations.
> 
>> If there is no gain on 2-socket, at least there is no loss either.
> 
> The point I'm trying to make is that if tweaking generic.h improves
> performance then it's an indicator of missed cases in the less-generic
> atomics code, and the latter is where our attention should be focused.
> I think basically all of the improvement Sokolov got was from upgrading
> the coverage of generic-gcc.h.
> 
>             regards, tom lane

Not exactly. I've checked, that new version of generic 
pg_atomic_fetch_or_u32
loop also gives improvement. Without that check I'd not suggest to fix
generic atomic functions. Of course, gcc intrinsic gives more gain.

-- 
Sokolov Yura aka funny_falcon
Postgres Professional: https://postgrespro.ru
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Add psql variables showing serverversion and psql version.
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Fix performance of generic atomics