Re: [PATCH 13/15] x86: add cmpxchg_flag() variant

From: Linus Torvalds
Date: Wed Aug 24 2011 - 19:12:12 EST


On Wed, Aug 24, 2011 at 4:04 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
>
>> I was also thinking that using it reduces register pressure, since you
>> don't need to keep the "old" value around, so it dies sooner.
>
> ... but you burn a register for the intermediate flag value, so you're
> just as bad off.

But that register has much shorter liveness - so I do agree that it *can* help.

Whether it actually *does* help is unclear. I do agree that we might
be better off without introducing yet another (questionable)
interface.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/