Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp798816pxb; Thu, 17 Feb 2022 15:13:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeWevLJJpO7IP7OC4PpHU+4Z07TCJnVDLev93ghbra/HzheJQN+9gPLoGXc1HGq/nl6pLX X-Received: by 2002:aa7:999a:0:b0:4cf:3290:ebb8 with SMTP id k26-20020aa7999a000000b004cf3290ebb8mr5078134pfh.19.1645139590418; Thu, 17 Feb 2022 15:13:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645139590; cv=none; d=google.com; s=arc-20160816; b=PLMGvHzCISJuzyNDDM3C81sWcsRYGnrCVqPP7Y9BuDt2R7PifzzusIdSrHKq0yobGF mIL7Zo+hVnT7IO29mGVf9fuDTLVwoEH2hcl8HE+/n8g7dnoXPstSIc8EOLcgnG16nJZP fH4/gqaBNa/l0UdK8No2Gyo3CHxLpfgk4JDAys/JQkNkUXBdSredJouoQFcVfsZKR7/X FVz2nIhLr6nAhWZGiG1rFyUAVwOsghOq4D93NzhAoQotS/YOH+JeWI1WVggbqoR5GnS3 dP0N2+a+Rey8c6jhc4itzxbw16ThDFIDUK9L511VHP7pF1IVKxa0BHIAcW4i45pl/Vq0 SFjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=Evn3QxAJ3AK623czP1KMQcw+4ELyfCxTkHQ5Lw0/E5s=; b=cJPQRJYdYk8PjRKZPX9zbOBE6BCUecYBxA+0JBhLK5AvylmBXPBsAeAavqZ0I/MTCg 5McZ4NUWkahEMEHuJXN5kLKGPu/6x7cxpLmSElqKYhfkWpbcV379rm4f0y8UN1Zr6WoY rw3oxAsBYZ6IdO9Ryeo1asHFwj3tYa/bgLEtf4JfMiBNDz3NBLLwSv+dJlmwlDNfOcQi VpcklzBdbkvyidMlqkbsegNfeWj+mZLC8bfbkpumEjh5HRpKEhoTRdEIBY9B/wvheNdj mGu8hGsTogtYJpkY/dERZPLLt2zyEymmZeQ0BrleDyiAO/Sn1i51bsLHXw+urd1+gbkZ 9t3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jySjE2Tz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h129si9009680pgc.336.2022.02.17.15.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 15:13:10 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jySjE2Tz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 64E4323DCDF; Thu, 17 Feb 2022 15:03:34 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243034AbiBQQWO (ORCPT + 99 others); Thu, 17 Feb 2022 11:22:14 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243030AbiBQQWM (ORCPT ); Thu, 17 Feb 2022 11:22:12 -0500 Received: from condef-02.nifty.com (condef-02.nifty.com [202.248.20.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A791162032 for ; Thu, 17 Feb 2022 08:21:57 -0800 (PST) Received: from conssluserg-03.nifty.com ([10.126.8.82])by condef-02.nifty.com with ESMTP id 21HGIPTQ027374; Fri, 18 Feb 2022 01:18:25 +0900 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 21HGI8NA031377; Fri, 18 Feb 2022 01:18:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 21HGI8NA031377 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1645114688; bh=Evn3QxAJ3AK623czP1KMQcw+4ELyfCxTkHQ5Lw0/E5s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jySjE2TzRv0gSlv7h6ZRl9dlkxrzl7OH8OqFVMQ4aN60wdW1UG3P99QU/SIDcnPYj /ICUgKlYytLyV0isp2pXf90jmA3ySgld25u06yDQQS+Yk5/3okj8fm9mmSmxvY1J6u bj0I2BA32pRAiVLkeAZm7lb1gSoZYX5KxiTQTbW8Hip72bUJ3GkChhf2zPUrg6hNID 2/KGdWCSlXJqiJQOIzRRnzdJJlJV+E3vVnCNhhyEFS78EbmPx8fBKVM+Lwl6xnWemu fYS4UB2JYIQ/Xillu+F2HkX7Mqn6ih8gWlrlzV3dvosCGinGQbvF7+1Tn9ww00rsa6 uwJz8gADf32CA== X-Nifty-SrcIP: [209.85.210.180] Received: by mail-pf1-f180.google.com with SMTP id z16so98666pfh.3; Thu, 17 Feb 2022 08:18:08 -0800 (PST) X-Gm-Message-State: AOAM533Tdgg+QppF39AS1md67zTSOUvkjcao/o+s9VdAjM0OW/jJvNfk 7ykohGGYkxj3wVdSq1f/Bnx1aE+sEdDIaxasgGg= X-Received: by 2002:a65:5341:0:b0:363:da77:99df with SMTP id w1-20020a655341000000b00363da7799dfmr2959567pgr.126.1645114687528; Thu, 17 Feb 2022 08:18:07 -0800 (PST) MIME-Version: 1.0 References: <978951d76d8cb84bab347c7623bc163e9a038452.1645100305.git.christophe.leroy@csgroup.eu> <35bcd5df0fb546008ff4043dbea68836@AcuMS.aculab.com> <9b8ef186-c7fe-822c-35df-342c9e86cc88@csgroup.eu> <3c2b682a7d804b5e8749428b50342c82@AcuMS.aculab.com> In-Reply-To: <3c2b682a7d804b5e8749428b50342c82@AcuMS.aculab.com> From: Masahiro Yamada Date: Fri, 18 Feb 2022 01:17:27 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h To: David Laight Cc: Christophe Leroy , "David S. Miller" , Jakub Kicinski , Andrew Morton , Ingo Molnar , Nick Desaulniers , "netdev@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 On Fri, Feb 18, 2022 at 12:15 AM David Laight wro= te: > > From: Christophe Leroy > > Sent: 17 February 2022 14:55 > > > > Le 17/02/2022 =C3=A0 15:50, Christophe Leroy a =C3=A9crit : > > > Adding Ingo, Andrew and Nick as they were involved in the subjet, > > > > > > Le 17/02/2022 =C3=A0 14:36, David Laight a =C3=A9crit : > > >> From: Christophe Leroy > > >>> Sent: 17 February 2022 12:19 > > >>> > > >>> All functions defined as static inline in net/checksum.h are > > >>> meant to be inlined for performance reason. > > >>> > > >>> But since commit ac7c3e4ff401 ("compiler: enable > > >>> CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to > > >>> uninline functions when it wants. > > >>> > > >>> Fair enough in the general case, but for tiny performance critical > > >>> checksum helpers that's counter-productive. > > >> > > >> There isn't a real justification for allowing the compiler > > >> to 'not inline' functions in that commit. > > > > > > Do you mean that the two following commits should be reverted: > > > > > > - 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely") > > > - 4c4e276f6491 ("net: Force inlining of checksum functions in > > > net/checksum.h") > > > > Of course not the above one (copy/paste error), but: > > - ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") > > That's the one I looked at. No. Not that one. The commit you presumably want to revert is: a771f2b82aa2 ("[PATCH] Add a section about inlining to Documentation/CodingStyle") This is now referred to as "__always_inline disease", though. CONFIG_OPTIMIZE_INLINING has 14 years of history for x86. See commit 60a3cdd06394 ("x86: add optimized inlining"). We always give gcc freedom to not inline functions marked as inline. --=20 Best Regards Masahiro Yamada