Re: better atomics - spinlock fallback?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: better atomics - spinlock fallback?
Дата
Msg-id 20131111185706.GL2401@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: better atomics  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: better atomics - spinlock fallback?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

Instead of de-supporting platforms that don't have CAS support or
providing parallel implementations we could relatively easily build a
spinlock based fallback using the already existing requirement for
tas().
Something like an array of 16 spinlocks, indexed by a more advanced
version of ((char *)(&atomics) >> sizeof(char *)) % 16. The platforms
that would fallback aren't that likely to be used under heavy
concurrency, so the price for that shouldn't be too high.

The only real problem with that would be that we'd need to remove the
spinnlock fallback for barriers, but that seems to be pretty much
disliked.

Thoughts?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: regclass error reports improperly downcased
Следующее
От: Andres Freund
Дата:
Сообщение: Re: logical changeset generation v6.5