Re: Use gcc built-in atomic inc/dec in lock.c

From: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
To: Mikko Tiihonen <mikko(dot)tiihonen(at)nitorcreations(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Use gcc built-in atomic inc/dec in lock.c
Date: 2012-12-12 22:19:57
Message-ID: CAEYLb_WKqE-TqcvpyF4Ctj+a_RMBUwZGbiee-t6JqQroyG7_ig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12 December 2012 22:11, Mikko Tiihonen
<mikko(dot)tiihonen(at)nitorcreations(dot)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.

--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2012-12-12 22:27:39 Re: encouraging index-only scans
Previous Message Andrew Dunstan 2012-12-12 22:12:36 Re: encouraging index-only scans