On Tuesday 13 September 2005 08:47, David S. Miller wrote:
> From: Andi Kleen <[EMAIL PROTECTED]>
> Date: Tue, 13 Sep 2005 08:15:50 +0200
>
> > Looks good.  Unfortunately XADD cannot be used for that.
>
> If that were possible, what would be the advantage
> compared to cmpxchg{b,w,l}?

(lock xadd = essentially atomic add and return result) 

It would tell the microcode exactly what we want to do so it
might optimize better. I don't know if it actually works better
on current micro architectures, but it might.

The problem is that it cannot do the spinlock atomically,
so we have to use cmpxchg anyways.

-Andi

Reply via email to