Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751654AbdCYSfk (ORCPT ); Sat, 25 Mar 2017 14:35:40 -0400 Received: from mail-it0-f53.google.com ([209.85.214.53]:38827 "EHLO mail-it0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751519AbdCYSfj (ORCPT ); Sat, 25 Mar 2017 14:35:39 -0400 MIME-Version: 1.0 In-Reply-To: <20170325182023.qfnj6vaixibbgbmd@hirez.programming.kicks-ass.net> References: <20170324142140.vpyzl755oj6rb5qv@hirez.programming.kicks-ass.net> <20170324164108.ibcxxqbhvx6ao54r@hirez.programming.kicks-ass.net> <20170324172342.radlrhk2z6mwmdgk@hirez.programming.kicks-ass.net> <20170324212329.GC5680@worktop> <20170325075156.GF32474@worktop> <20170325182023.qfnj6vaixibbgbmd@hirez.programming.kicks-ass.net> From: Linus Torvalds Date: Sat, 25 Mar 2017 11:28:35 -0700 X-Google-Sender-Auth: 4qtP-42LKmb5om_BiudmSbFZRW8 Message-ID: Subject: Re: locking/atomic: Introduce atomic_try_cmpxchg() To: Peter Zijlstra Cc: Andy Lutomirski , Dmitry Vyukov , Andrew Morton , Andy Lutomirski , Borislav Petkov , Brian Gerst , Denys Vlasenko , "H. Peter Anvin" , Josh Poimboeuf , Paul McKenney , Thomas Gleixner , Ingo Molnar , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 448 Lines: 12 On Sat, Mar 25, 2017 at 11:20 AM, Peter Zijlstra 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