Re: Readme of Buffer Management seems to have wrong sentence

Поиск
Список
Период
Сортировка
От Ants Aasma
Тема Re: Readme of Buffer Management seems to have wrong sentence
Дата
Msg-id CA+CSw_tYwZ=N1kg46VhDKHMHT47X9W4sRumVDJQNo_wGRfVNpg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Readme of Buffer Management seems to have wrong sentence  (Ants Aasma <ants@cybertec.at>)
Список pgsql-hackers
On Tue, May 22, 2012 at 11:36 PM, Ants Aasma <ants@cybertec.at> wrote:
> ... The free list
> itself is a bit trickier, but if it's still necessary/useful then
> SC->firstFreeBuffer and buf->freeNext are in effect a linked-list
> stack, there should plenty of tested lock free algorithms floating
> around for that. (btw. lastFreeBuffer looks like dead code, is that
> correct?)

Thinking about it a bit more, if the freelist is mostly empty, a
simpler alternative would be to make an unprotected read to check
SC->firstFreeBuffer and only acquire BufFreelistLock if there's
anything to pop. This would reduce the lock free parts to just
atomically incrementing a variable.

Ants Aasma
--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de


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

Предыдущее
От: Sergey Koposov
Дата:
Сообщение: Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: [RFC] Interface of Row Level Security