Re: optimize atomic exchanges

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: optimize atomic exchanges
Дата
Msg-id 20231201031815.GA1519459@nathanxps13
обсуждение исходный текст
Ответ на optimize atomic exchanges  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: optimize atomic exchanges  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Wed, Nov 29, 2023 at 03:29:05PM -0600, Nathan Bossart wrote:
> I haven't done any sort of performance testing on this yet.  Some
> preliminary web searches suggest that there is unlikely to be much
> difference between cmpxchg and xchg, but presumably there's some difference
> between xchg and doing cmpxchg in a while loop (as is done in
> atomics/generic.h today).  I'll report back once I've had a chance to do
> some testing...

Some rudimentary tests show a >40% speedup with this patch on x86_64.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Lev Kokotov
Дата:
Сообщение: Re: Bug in pgbench prepared statements
Следующее
От: shveta malik
Дата:
Сообщение: Re: Synchronizing slots from primary to standby