Re: locking/atomic: Introduce atomic_try_cmpxchg()

From: Linus Torvalds
Date: Sat Mar 25 2017 - 14:03:56 EST


On Sat, Mar 25, 2017 at 12:51 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Fri, Mar 24, 2017 at 10:23:29PM +0100, Peter Zijlstra wrote:
>
>> I'll try and redo the patches that landed in tip and see what it does
>> for total vmlinux size somewhere tomorrow.
>
> text data bss dec hex filename
> 10726413 4540256 843776 16110445 f5d36d defconfig-build/vmlinux.pre
> 10730509 4540256 843776 16114541 f5e36d defconfig-build/vmlinux.post
>
> :-(

Hmm. But you are comparing against the *broken* version that did the
unconditional store of the result.

You should at least compare against the fixed version with the
conditional store. That's the one that was hard to get good code
generation from, wasn't it?

Linus