Re: [HACKERS] atomic reads & writes (with no barriers)

2015-12-04 Thread Andres Freund
Hi, On 2015-12-03 16:10:51 -0600, Kevin Grittner wrote: > Is the c.h change above on anything resembling the right track for > a patch for this? If not, what would such a patch look like? I think a better path would be to add fallback support for 64bit atomics - like we already have for 32bit. T

Re: [HACKERS] atomic reads & writes (with no barriers)

2015-12-04 Thread Kevin Grittner
On Fri, Dec 4, 2015 at 6:35 AM, Greg Stark wrote: > On Thu, Dec 3, 2015 at 10:10 PM, Kevin Grittner wrote: >> Is the c.h change above on anything resembling the right track for >> a patch for this? If not, what would such a patch look like? > > It would be nicer if we could come up with an inter

Re: [HACKERS] atomic reads & writes (with no barriers)

2015-12-04 Thread Greg Stark
On Thu, Dec 3, 2015 at 10:10 PM, Kevin Grittner wrote: > Is the c.h change above on anything resembling the right track for > a patch for this? If not, what would such a patch look like? It would be nicer if we could come up with an interface that didn't require #ifdefs everywhere it's used. So

[HACKERS] atomic reads & writes (with no barriers)

2015-12-03 Thread Kevin Grittner
The "snapshot too old" patch has an XXX comment about being able to drop a spinlock usage from a frequently called "get" method if the 64-bit read could be trusted to be atomic. There is no need for a barrier in this case, because a stale value just means we won't be quite as aggressive about prun