Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4783112pxj; Wed, 12 May 2021 13:10:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaoYOL29arvNDWGTPfaW2TjdluoGktWFwKaGVRKZ+MXOIR8nDjmwr9UpomIz7Xh5x2hS4v X-Received: by 2002:a05:6808:83:: with SMTP id s3mr25265746oic.104.1620850251057; Wed, 12 May 2021 13:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620850251; cv=none; d=google.com; s=arc-20160816; b=R8BzwX7hFifKe6FRO4wuy7te242nzHCHb4FVxmV2NBkI3xg/QTMdof6c2FlfukZ4mG SLjbKmi3+dYcvhOt9vnqSeG1og+bRG4BFi+ku0MxaPYygTbY2NsaRRqYq/iChjzC5K+M peYNogJeaesbrNWge/O6wMk/rgjQ0EMA6TRl6pRpM/w6Z1hbTwNDfH3XSWndMGPh/HpT dJ2NhR0m1N/beY6tB69r9FgHtR492M8J/Y/p4xTK2kxOmaX7r6Qk0nlfoQ/FgWnqrRb5 PiE7p/bgLPRW68hIGnUuhNet5eFSAv2pOqOIkhioM7SvIBsEBYgRiuExbHUReHolUvW4 bYAw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=m3rPbr0KF9hO69hsbA/NgJuQf58N/3u4R0JjcNxEdjs=; b=kggyGwmehH7Gklz9HxYPsEkGP5G+O+l0KaQNV3SFGxMlfo8u+4LIXvJTvK9KVaBlZ1 YXEC3mafEdxX7RyPLkN/0ShsDf0RjmsDUyAjD4vq+sqBDSuglvc0FrK4HEHokLOyD3kL DXuV5s4g394sCj3Jkc5z5oSz5tmVXwObHIqPGkSsaX7UKpbF4ZWT7MiwvHlm2/HTak4T QlqE2AQynnF0twon7LJBabw+YWiGaHUBXKfHJXuajpYu6S4E/VS1hkuOnCdvvQ9B6jKW rc+Jblz3eRiBl9VWYlpTyAbdgF2iCCxICARqgJXag67c5T+V3XitZNhhyCeMqext3q7j Bd4w== ARC-Authentication-Results: i=1; mx.google.com; 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 l63si1009480oif.167.2021.05.12.13.10.10; Wed, 12 May 2021 13:10:51 -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; 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 S1379851AbhELUBG (ORCPT + 99 others); Wed, 12 May 2021 16:01:06 -0400 Received: from gate.crashing.org ([63.228.1.57]:41948 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355206AbhELS1n (ORCPT ); Wed, 12 May 2021 14:27:43 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 14CIL4bD009429; Wed, 12 May 2021 13:21:04 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 14CIL4PD009428; Wed, 12 May 2021 13:21:04 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 12 May 2021 13:21:03 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc: Force inlining of csum_add() Message-ID: <20210512182103.GX10366@gate.crashing.org> References: <20210511105154.GJ10366@gate.crashing.org> <20210512143105.GW10366@gate.crashing.org> <2623fe98-7a73-f7a2-bcba-2d668d00ffd0@csgroup.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2623fe98-7a73-f7a2-bcba-2d668d00ffd0@csgroup.eu> User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 12, 2021 at 04:43:33PM +0200, Christophe Leroy wrote: > Le 12/05/2021 ? 16:31, Segher Boessenkool a ?crit?: > >On Wed, May 12, 2021 at 02:56:56PM +0200, Christophe Leroy wrote: > >>Le 11/05/2021 ? 12:51, Segher Boessenkool a ?crit?: > >>>Something seems to have decided this asm is more expensive than it is. > >>>That isn't always avoidable -- the compiler cannot look inside asms -- > >>>but it seems it could be improved here. > >>> > >>>Do you have (or can make) a self-contained testcase? > >> > >>I have not tried, and I fear it might be difficult, because on a kernel > >>build with dozens of calls to csum_add(), only ip6_tunnel.o exhibits such > >>an issue. > > > >Yeah. Sometimes you can force some of the decisions, but that usually > >requires knowing too many GCC internals :-/ > > > >>>>And there is even one completely unused instance of csum_add(). > >>> > >>>That is strange, that should never happen. > >> > >>It seems that several .o include unused versions of csum_add. After the > >>final link, one remains (in addition to the used one) in vmlinux. > > > >But it is a static function, so it should not end up in any object file > >where it isn't used. > > Well .... did I dream ? > > Now I only find one extra .o with unused csum_add() : That's > net/ipv6/exthdrs.o > It matches the one found in vmlinux. > > Are you interested in -fdump-tree-einline-all for that one as well ? Sure. Hopefully it will show more :-) Segher