Re: Freezing without write I/O
| От | Andres Freund |
|---|---|
| Тема | Re: Freezing without write I/O |
| Дата | |
| Msg-id | 20130920124031.GD25971@awork2.anarazel.de обсуждение исходный текст |
| Ответ на | Re: Freezing without write I/O (Robert Haas <robertmhaas@gmail.com>) |
| Ответы |
Re: Freezing without write I/O
|
| Список | pgsql-hackers |
Hi,
I agree with most of what you said - I think that's a littlebit too much
change for too little benefit.
On 2013-09-20 08:32:29 -0400, Robert Haas wrote:
> Personally, I think the biggest change that would help here is to
> mandate that spinlock operations serve as compiler fences. That would
> eliminate the need for scads of volatile references all over the
> place.
The effectively already do, don't they? It's an external, no-inlineable
function call (s_lock, not the actual TAS). And even if it were to get
inlined via LTO optimization, the inline assembler we're using is doing
the __asm__ __volatile__ ("...", "memory") dance. That's a full compiler
barrier.
The non-asm implementations call to OS/compiler primitives that are also
fences.
In the case I brougth up here there is no spinlock or something similar.
Greetings,
Andres Freund
-- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services
В списке pgsql-hackers по дате отправления: