Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1743975rwb; Fri, 19 Aug 2022 08:41:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Oh4F/GeoNzc4YTvnAdLFplSjE+si5T/p1M2JlOROjMsj7zGm4frNoBZCXW8DHLp/M2w1v X-Received: by 2002:a63:d841:0:b0:427:e7f2:bef with SMTP id k1-20020a63d841000000b00427e7f20befmr6676409pgj.386.1660923684383; Fri, 19 Aug 2022 08:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660923684; cv=none; d=google.com; s=arc-20160816; b=gfN+WVi6zCq9tWBDbGUbLfUZ9wQHwKJUMaa38KvDFMZKPeB75dsfVdkjf6pKfK8gEl MYUCtLqvOIdf2N/Ta2Ves20jqOxnktTaWOohBxZjg+KUzHmcEmAOwkYneynMS+GCGg2i Ayg7Haek4wTeTuYidXfhG+G52sxiiMwNMQwh7fKQwcr6556dP+0PuJ12Oly7PFFinLkx C0UtUT6YSUjl28lJqbbpzRPQfIuAVDBlD/XrIrL7P2+R29NHp2+hm+CIgwgI/rT+z6vW smTDaF4UCCx2XVG0Gi2K58zSs1swYTW9al+xzmIh0HXjMHYuVwF0QSl8CxoSTr/5Swv3 15ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=WV3FN7oW9IyiId8j61mPO8pKX3+xZxvuEeAxFpQ4wCM=; b=L3bvB1SoorZq3s4+zEaw1z8L/j1J6m56nsykuUHfLbdtNc9eURBOgNE4xvq9vNdEA3 mJpOTVFMElEcUMWyrlWUMwRiAxJxj+xxrtSyR29lNMk11zUjU+2zcHX3XmmZagF1aS1r ad43oiMaXLt3EzL+DUQ6h+yZdRphIvXm6MotB9WruyZQ5J5FFbsNTTI5qKmXHezXbkqb u6s2iISHg6BEZCCWD9Jd+NtdwikgZBufeAAJBRPSFWN/F7wdN3D/414PxUCZtzXwC80I fOq4jnLZB9QQN1iYgjPb24NYkN3PKuicnkoD+FxyeNC/OCiUjboO6tJUUVCIcS4rKLAj VaDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay19-20020a056a00301300b005363009f0c9si16838pfb.16.2022.08.19.08.41.12; Fri, 19 Aug 2022 08:41:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349775AbiHSPcy (ORCPT + 99 others); Fri, 19 Aug 2022 11:32:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349756AbiHSPcw (ORCPT ); Fri, 19 Aug 2022 11:32:52 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CA218101C72; Fri, 19 Aug 2022 08:32:49 -0700 (PDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 27JFLw53006284; Fri, 19 Aug 2022 10:21:58 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 27JFLvQc006283; Fri, 19 Aug 2022 10:21:57 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 19 Aug 2022 10:21:57 -0500 From: Segher Boessenkool To: Menglong Dong Cc: Nick Desaulniers , kuba@kernel.org, miguel.ojeda.sandonis@gmail.com, ojeda@kernel.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, asml.silence@gmail.com, imagedong@tencent.com, luiz.von.dentz@intel.com, vasily.averin@linux.dev, jk@codeconstruct.com.au, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, kernel test robot , linux-toolchains Subject: Re: [PATCH net-next v4] net: skb: prevent the split of kfree_skb_reason() by gcc Message-ID: <20220819152157.GO25951@gate.crashing.org> References: <20220816032846.2579217-1-imagedong@tencent.com> <20220818165838.GM25951@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On Fri, Aug 19, 2022 at 10:55:42PM +0800, Menglong Dong wrote: > Thanks for your explanation about the usage of 'noinline' and 'no_icf'! > I think 'noclone' seems enough in this case? As the function > 'kfree_skb_reason' we talk about is a global function, I think that the > compiler has no reason to make it inline, or be merged with another > function. Whether something is inlined is decided per instance (except for always_inline and noinline functions). Of course the function body has to be available for anything to be inlined, so barring LTO this can only happen for function uses in the same source file. Not very likely indeed, but not entirely impossible either. A function can be merged if there is another function that does exactly the same thing. This is unlikely with functions that do some serious work of course, but it is likely with stub-like functions. gl;hf, Segher