Re: Add spin_delay() implementation for Arm in s_lock.h

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add spin_delay() implementation for Arm in s_lock.h
Дата
Msg-id 1275075.1641525818@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add spin_delay() implementation for Arm in s_lock.h  (Andres Freund <andres@anarazel.de>)
Ответы Re: Add spin_delay() implementation for Arm in s_lock.h  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> These separate shm_mq instances forward messages in a circle,
> "leader"->worker_1->worker_2->...->"leader". So there isn't a single contended
> spinlock, but a bunch of different spinlocks, each with at most two backends
> accessing it?

No; there's just one spinlock.  I'm re-purposing the spinlock that
test_shm_mq uses to protect its setup operations (and thereafter
ignores).  AFAICS the N+1 shm_mq instances don't internally contain
spinlocks; they all use atomic ops.

(Well, on crappy architectures maybe there's spinlocks underneath
the atomic ops, but I don't think we care about such cases here.)

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Add spin_delay() implementation for Arm in s_lock.h
Следующее
От: Lukas Fittl
Дата:
Сообщение: Re: [PATCH] Add extra statistics to explain for Nested Loop