Re: spinlocks on HP-UX

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: spinlocks on HP-UX
Дата
Msg-id 8434.1314642110@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: spinlocks on HP-UX  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I'm actually not convinced that we're entirely consistent here about
> what we require the semantics of acquiring and releasing a spinlock to
> be.  For example, on x86 and x86_64, we acquire the lock using xchgb,
> which acts a full memory barrier.  But when we release the lock, we
> just zero out the memory address, which is NOT a full memory barrier.
> Stores can't cross it, but non-dependent loads of different locations
> can back up over it.  That's pretty close to a full barrier, but it
> isn't, quite.

Right.  That's why I wrote the comment as I did; it says what the actual
requirement is.  There probably are cases where our implementations are
more restrictive than necessary (I hope none where they are weaker).
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: spinlocks on HP-UX
Следующее
От: Robert Haas
Дата:
Сообщение: Re: spinlocks on HP-UX