Re: better atomics - spinlock fallback? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: better atomics - spinlock fallback?
Date
Msg-id 20131112183001.GJ23777@awork2.anarazel.de
Whole thread Raw
In response to Re: better atomics - spinlock fallback?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2013-11-12 13:21:30 -0500, Robert Haas wrote:
> > 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.

Ok, cool. The prototype patch I have for that is pretty small, so it doesn't
look too bad.

What currently scares me is the amount of code I have to write that I can't
test... I really can't see me being able to provide a patch that doesn't
require some buildfarm cycles to really work on all platforms.

>  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.

I think any platform where we aren't able to provide a proper compiler/memory
barrier will also have broken spinlock relase semantics (as in missing release
memory barrier). So arguably removing the fallback is a good idea anyway.

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: logical changeset generation v6.6
Next
From: Andrew Dunstan
Date:
Subject: additional json functionality