Re: locking/atomic: Introduce atomic_try_cmpxchg()

From: Linus Torvalds
Date: Sat Mar 25 2017 - 14:35:42 EST


On Sat, Mar 25, 2017 at 11:20 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> Added above, a few bytes smaller than the shiny new one actually.

Hmm. Sad. The label approach looked like it would match the semantics
of cmpxchg perfectly, but it's not as optimal as it superficially
would have seemed.

And I assume that register allocation etc is different enough that
there's no sane way to diff the asm to see what changed.

Linus