Re: Possible memory ordering bug in page reclaim?

From: David S. Miller
Date: Sat Oct 15 2005 - 14:31:04 EST

From: Linus Torvalds <torvalds@xxxxxxxx>
Date: Sat, 15 Oct 2005 09:57:47 -0700 (PDT)

> On Sat, 15 Oct 2005, Herbert Xu wrote:
> >
> > Yes atomic_add_negative should always be a barrier.
> I disagree. That would be very expensive on anything but x86, where it
> just happens to be true for other reasons. Atomics do _not_ implement
> barriers.

When they return values, they are defined to be barriers.
It's even on the documentation :-)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at