Re: LWLockRelease

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LWLockRelease
Дата
Msg-id 15729.1107441172@sss.pgh.pa.us
обсуждение исходный текст
Ответ на LWLockRelease  ("Simon Riggs" <simon@2ndquadrant.com>)
Список pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.com> writes:
> A few thoughts on LWLock data structures...

> In lwlock.c we hold a list of lwlocks held:
> held_lwlocks[MAX_SIMUL_LWLOCKS]
> where
> #define MAX_SIMUL_LWLOCKS    100

> The code for LWLockRelease assumes that the last acquired lock will
> always be the first one to be released, and uses an O(N) loop to search
> for the lock to release.

> Setting MAX_SIMUL_LWLOCKS to this fairly high number doesn't seem to
> match the optimistic use of the O(N) algorithm.

So?  The search only examines the actually-in-use array entries.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: LWLock cache line alignment
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: libpq API incompatibility between 7.4 and 8.0