From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5439C433B4 for ; Thu, 22 Apr 2021 11:49:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C96861409 for ; Thu, 22 Apr 2021 11:49:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236099AbhDVLtl (ORCPT ); Thu, 22 Apr 2021 07:49:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230510AbhDVLtj (ORCPT ); Thu, 22 Apr 2021 07:49:39 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1782DC06174A; Thu, 22 Apr 2021 04:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=h4AVMm+Y3zmBUJJ9Lie4N/ArTZTC3WPpTqp9fKjAr1Y=; b=qJqAKnxJdl5z1xNr6KMz95RWtp YqQwKVb9aTVLxPGsDtEptzCZ04aiNNj0FG8tTQOr8ltdg+fh4HWGvZqM+XRwoTnl0vCEcNtcu4SUL GIIPznteonjrOLC79u/ycFIMbBVd22nUD1ksBeko6hlfl0Jkrbj9YymIArIqSUKvCD8y1Vy3sW5cv zsmhjQ37W2+tOm29DvDyJ0gyGvQMKJxNCtrSP9amZ0R7uJOSh/dgRb7qYzC9MLESxOAqK76WIh3sD fw/HZHAkGpyqav2VlEOXns/lSWkLFgk3zWfUG7FSf/MmP5PzQBMISU2K4RJd4mi2lv2PXikFop9vh 7r1lqMmg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lZXp3-00Gcoq-0t; Thu, 22 Apr 2021 11:48:41 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 97239300103; Thu, 22 Apr 2021 13:48:39 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7E08F2C1893EB; Thu, 22 Apr 2021 13:48:39 +0200 (CEST) Date: Thu, 22 Apr 2021 13:48:39 +0200 From: Peter Zijlstra To: David Malcolm Cc: Ard Biesheuvel , linux-toolchains@vger.kernel.org, Linux Kernel Mailing List , Josh Poimboeuf , Jason Baron , "Steven Rostedt (VMware)" , yuanzhaoxiong@baidu.com Subject: Re: static_branch/jump_label vs branch merging Message-ID: References: <5f78b7e2f9ae937271ef52ee9e999a91c2719da9.camel@redhat.com> <3c062f70ffef2dcd48a661f7c8162fb8fbaf6869.camel@redhat.com> <0a9da587b0330bafdf612c3d51285e144b0b9e46.camel@redhat.com> <5a07bde1a9fa9a056a19637399b0635252ddb303.camel@redhat.com> <20210409213949.GA33256@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210409213949.GA33256@worktop.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 09, 2021 at 11:39:49PM +0200, Peter Zijlstra wrote: > On Fri, Apr 09, 2021 at 05:07:15PM -0400, David Malcolm wrote: > > > You've built a very specific thing out of asm-goto to fulfil the tough > > requirements you outlined above - as well as the nops, there's a thing > > in another section to contend with. > > > > How to merge these asm-goto constructs? > > By calling the function less, you emit less of them. Which then brings > us back to the whole pure/const thing. > > > Doing so feels very special-case to the kernel and not something that > > other GCC users would find useful. > > Doesn't it boil down to 'fixing' the pure/const vs asm-goto interaction? > I could imagine that having that interaction fixed could allow other > creative uses. Here is another variant: https://lore.kernel.org/lkml/830177B0-45E0-4768-80AB-A99B85D3A52F@baidu.com/ Can we please have a __pure__ attribute that is prescriptive and not a hint the compiler is free to ignore for $raisins ?