Messages in this thread | | | Subject | Re: ordered memory access | Date | Thu, 30 Sep 1999 16:52:04 -0400 | From | Horst von Brand <> |
| |
Andrea Arcangeli <andrea@suse.de> said: > On 30 Sep 1999, Jes Sorensen wrote:
[...]
> >Intuitively I think it makes sense to do so, and I doubt it will be a > >performance hit at all, but I am just guessing here.
> On alpha you'll avoid some mb/wmb additional asm instruction ;). > > If you don't test atomically the retval it make no sense to me to enforce > ordering so the alpha implementation looks fine to me.
What if you intend to use something like:
atomic_inc(lock); /* Do something */
and the /* Do something */ is moved _before_ the atomic_inc(lock)? For this to be of any use in this way, you'd need the atomic_inc() and its ilk to act as barriers. So it depends on the use to which they are put (or are intended to be put). -- Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |