Re: [COMMITTERS] pgsql: Do all accesses to shared buffer

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: [COMMITTERS] pgsql: Do all accesses to shared buffer
Дата
Msg-id 1129931029.19971.11.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Do all accesses to shared buffer headers through  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: [COMMITTERS] pgsql: Do all accesses to shared buffer  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 2005-17-10 at 16:48 -0500, Jim C. Nasby wrote:
> Sorry if I'm just confused here, but don't LWLocks protect data
> structures susceptible to corruption? And if that's the case don't we
> need to be sure that the compiler can't optimize around them?

LWLocks certainly do protect shared data, and if the compiler rearranged
loads and stores around LWLocks acquire/release, it would result in
corruption. Tom was arguing it is unlikely the compiler will actually do
this (because LWLockAcquire is an out-of-line function call that might
invoke a system call, unlike SpinLockAcquire).

-Neil




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Seeing context switch storm with 10/13 snapshot of
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak