Re: Fix performance of generic atomics
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Jeff Janes <jeff.janes@gmail.com>,
Jesper Pedersen <jesper.pedersen@redhat.com>,
Sokolov Yura <funny.falcon@postgrespro.ru>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-09-06T12:56:20Z
Lists: pgsql-hackers
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
Commits
-
Further marginal hacking on generic atomic ops.
- bfea92563c51 11.0 landed
-
Use more of gcc's __sync_fetch_and_xxx builtin functions for atomic ops.
- e09db94c0a5f 11.0 landed
-
Remove duplicate reads from the inner loops in generic atomic ops.
- e530be96859e 11.0 landed