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

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: Use gcc built-in atomic inc/dec in lock.c
Дата
Msg-id
CA+TgmoZ1WOXZVFUWfaNE18Ynt1WApcxwzZAfbP4Wh+98xHtMVw@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Use gcc built-in atomic inc/dec in lock.c Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
Re: Use gcc built-in atomic inc/dec in lock.c Peter Geoghegan <peter@2ndquadrant.com>
Re: Use gcc built-in atomic inc/dec in lock.c Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
Re: Use gcc built-in atomic inc/dec in lock.c Любен Каравелов <karavelov@mail.bg>
Re: Use gcc built-in atomic inc/dec in lock.c Merlin Moncure <mmoncure@gmail.com>
Re: Use gcc built-in atomic inc/dec in lock.c Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
Re: Use gcc built-in atomic inc/dec in lock.c Robert Haas <robertmhaas@gmail.com>
On Wed, Dec 12, 2012 at 5:19 PM, Peter Geoghegan  wrote:
> On 12 December 2012 22:11, Mikko Tiihonen
>  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 по дате отправления
От: Andrew Dunstan
Дата:
От: Robert Haas
Дата:
FAQ