Re: Move PinBuffer and UnpinBuffer to atomics

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Move PinBuffer and UnpinBuffer to atomics
Дата
Msg-id CAHyXU0xxsGb1Q6ZQR84Y8Oauq-Tyu-ZeQWujQ1RBJu+jM6b1WA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Move PinBuffer and UnpinBuffer to atomics  (Andres Freund <andres@anarazel.de>)
Ответы Re: Move PinBuffer and UnpinBuffer to atomics  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Mon, Sep 14, 2015 at 9:06 PM, Andres Freund <andres@anarazel.de> wrote:
> On 2015-09-14 17:41:42 +0200, Andres Freund wrote:
>> I pointed out how you can actually make this safely lock-free giving you
>> the interesting code.
>
> And here's an actual implementation of that approach. It's definitely
> work-in-progress and could easily be optimized further. Don't have any
> big machines to play around with right now tho.

Are you confident this is faster across all workloads?   Pin/Unpin are
probably faster but this comes at a cost of extra atomic ops during
the clock sweep loop.  I wonder if this will degrade results under
heavy contention.

Also, I'm curious about your introduction of __builtin_expect()
macros.  Did you measure any gain from them?  I bet there are other
places they could be used -- for example the mvcc hint bit checks on
xmin.

merlin



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Can extension build own SGML document?
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Multi-tenancy with RLS