LWLockRelease

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема LWLockRelease
Дата
Msg-id KGEFLMPJFBNNLNOOOPLGCEDECIAA.simon@2ndquadrant.com
обсуждение исходный текст
Ответы Re: LWLockRelease  (Neil Conway <neilc@samurai.com>)
Re: LWLockRelease  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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.

Any thoughts on reducing the size of that array and/or reducing the lock
release time?

Best Regards, Simon Riggs



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: libpq API incompatibility between 7.4 and 8.0
Следующее
От: "Simon Riggs"
Дата:
Сообщение: LWLock cache line alignment