Re: Use gcc built-in atomic inc/dec in lock.c - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Use gcc built-in atomic inc/dec in lock.c
Date
Msg-id CA+TgmoZ1WOXZVFUWfaNE18Ynt1WApcxwzZAfbP4Wh+98xHtMVw@mail.gmail.com
Whole thread Raw
In response to Re: Use gcc built-in atomic inc/dec in lock.c  (Peter Geoghegan <peter@2ndquadrant.com>)
List pgsql-hackers
On Wed, Dec 12, 2012 at 5:19 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> On 12 December 2012 22:11, Mikko Tiihonen
> <mikko.tiihonen@nitorcreations.com> wrote:
>> noticed a "XXX: It might be worth considering using an atomic fetch-and-add
>> instruction here, on architectures where that is supported." in lock.c
>>
>> Here is my first try at using it.
>
> That's interesting, but I have to wonder if there is any evidence that
> this *is* actually helpful to performance.

Ditto.  I've had at least one bad experience with an attempted change
to this sort of thing backfiring.  And it's possible that's because my
implementation sucked, but the only concrete evidence of that which I
was able to discern was bad performance.  So I've learned to be
skeptical of these kinds of things unless there are clear benchmark
results.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Assert for frontend programs?
Next
From: Robert Haas
Date:
Subject: Re: Re: bulk_multi_insert infinite loops with large rows and small fill factors