Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp396280pxy; Thu, 22 Apr 2021 04:50:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKGJvv7rSd96f8sgHI9SUjEUzugCiDe0R19qHqjSL7gw6btKjxQnSQ4j7HmD0Ve+2Zm1Oy X-Received: by 2002:a17:906:a103:: with SMTP id t3mr3027344ejy.334.1619092225497; Thu, 22 Apr 2021 04:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619092225; cv=none; d=google.com; s=arc-20160816; b=Rz4WLoLI/vsOfBou8WJssr+JjXjr1hS+uI5Y7A0k8R+1JAkavHS/DXEu/b+eyDD4UV F/RQkIZan/YDkRt5cVfhLZzu5v5gASGmRUnOh/fL7iXZ8nez8yzlMD+PZHsEyILkH3uS lqvjesBGfE2mA3zw7UY3AcVM+cO0hHjA41CGvpvkkGsjYh2mv5dDDv1GuTCJ/45Wgcne VDCx2UjmnLuXEz8+ZM2CKu5uRfRtAorpxR9ls2QzsHojIAbs/6lauDCTDdR2F50JY5TG r7roUdl7K4zSXHMQaAQFquBdVYp55iWym/yaYCpQWfOk5VbEcUQ9w3vBy7OtmAvgeOJ8 KODw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=h4AVMm+Y3zmBUJJ9Lie4N/ArTZTC3WPpTqp9fKjAr1Y=; b=IQam3suUaIvE4fvZUnb5iO19hynVGEtS0nJByEplyoMvbyBceaj3pOKxH/HGXUzPjY Q3i6WFnULTYqIyHcW23mjE8ZrA7FSKzlFrPanCJPEMBe3vMwSOF9Ngae0hOg8w/L1SWt InNp9mRPI5z7Cu5a51/43Xnp4jXZO5CDFGkUcSIg4/2hLWcaRquHGO1TQPjda5D8O2AP CorRMJ+lcvVEk9S1b4XGMPOOdubyOqqMMDaVtVzZhQkJ1IsYpUQh9E/FBxqWxEkuEJHE XwjGQpjQPOPCulZ1IE265VgQuxkDtphOfWBYmhxZxunQ+FsbBArC28MjCBtZ/6YCgHUQ 88WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=qJqAKnxJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lz16si2053631ejb.276.2021.04.22.04.50.00; Thu, 22 Apr 2021 04:50:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=qJqAKnxJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236043AbhDVLtk (ORCPT + 99 others); Thu, 22 Apr 2021 07:49:40 -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 ?