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

From: H. Peter Anvin
Date: Tue Aug 23 2011 - 18:44:26 EST


On 08/23/2011 03:15 PM, Jeremy Fitzhardinge wrote:
>
> However, having prototyped it, I dunno, it doesn't really seem like much
> of a win for all the extra code it adds. I just can't get too excited
> about an extra test instruction adjacent to a monster like a locked
> cmpxchg. The jump variant avoids the test, but gcc still generates some
> pretty bogus stuff:
>

A compare is hardly a big cost, as you're quite correctly pointing out.

-hpa

--
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/