Re: locked reads for atomics

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: locked reads for atomics
Дата
Msg-id 20231127210030.GA140335@nathanxps13
обсуждение исходный текст
Ответ на Re: locked reads for atomics  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: locked reads for atomics  ("Li, Yong" <yoli@ebay.com>)
Re: locked reads for atomics  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
Here's a v2 of the patch set in which I've attempted to address all
feedback.  I've also added a pg_write_membarrier_u* pair of functions that
provide an easy way to write to an atomic variable with full barrier
semantics.  In the generic implementation, these are just aliases for an
atomic exchange.

0002 demonstrates how these functions might be used to eliminate the
arch_lck spinlock, which is only ever used for one boolean variable.  My
hope is that the membarrier functions make eliminating spinlocks for
non-performance-sensitive code easy to reason about.

(We might be able to use a pg_atomic_flag instead for 0002, but that code
seems intended for a slightly different use-case and has more complicated
barrier semantics.)

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Partial aggregates pushdown
Следующее
От: Robert Haas
Дата:
Сообщение: Re: POC, WIP: OR-clause support for indexes