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
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
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
On Thu, Sep 22, 2011 at 10:45 PM, Jeff Davis wrote:
> + for (i = 0; i < num_items; ++i)
> + /* do something with q->items[i] */
> +
> +This code turns out to be unsafe, because the writer might increment
> +q->num_items before it finishes storing the new item into the
> appropriate slot.