Re: better atomics - spinlock fallback?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: better atomics - spinlock fallback?
Дата
Msg-id CA+TgmoaN5VE6XGFPrMfjPdr7sLkjej=RvnzhsfyKBaJC=G13cA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: better atomics - spinlock fallback?  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: better atomics - spinlock fallback?  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On Mon, Nov 11, 2013 at 1:57 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> 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.

I think this is worth considering.  I'm not too clear what to do about
the barriers problem, though.  I feel like we've dug ourselves into a
bit of a hole, there, and I'm not sure I understand the issues well
enough to dig us back out of it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: logical changeset generation v6.6
Следующее
От: Andres Freund
Дата:
Сообщение: Re: logical changeset generation v6.6