Re: [HACKERS] Re: memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-24 Thread Martijn van Oosterhout
On Sat, Sep 24, 2011 at 12:46:48PM -0400, Robert Haas wrote: > > I found the Linux kernel document on this topic quite readable. I think > > the main lesson here is that processors track data dependancies (other > > than the Alpha apparently), but not control dependancies.  So in the > > example, t

Re: [HACKERS] Re: memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-24 Thread Robert Haas
On Sat, Sep 24, 2011 at 9:45 AM, Martijn van Oosterhout wrote: > I think memory accesses are also fantastically expensive, so it's worth > some effort to optimise that. This is definitely true. > I found the Linux kernel document on this topic quite readable. I think > the main lesson here is th

Re: [HACKERS] Re: memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-24 Thread Martijn van Oosterhout
On Fri, Sep 23, 2011 at 04:22:09PM +0100, Greg Stark wrote: > So you have two memory fetches which I guess I still imagine have to > be initiated in the right order but they're both in flight at the same > time. I have no idea how the memory controller works and I could > easily imagine either one