Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4540849pxj; Wed, 12 May 2021 07:49:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3/XU9QgSeZxbBjWs080Djlw5Zt1RUDnBA0rRQQ+qm1+5r2rvwLBPWOFQ9DUQrCUE6SeOh X-Received: by 2002:a2e:8e71:: with SMTP id t17mr30336200ljk.54.1620830979850; Wed, 12 May 2021 07:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620830979; cv=none; d=google.com; s=arc-20160816; b=jRPdSv2btQn9rJXc/EDOIOC4zFxCpigwIzCnLqu7mpxdlcSWs3il5wLOX5YU3U4ZKe urMBOWbsiDUYjESRTB4XmOdG6c1QXqkK/rDOYbfrqIF4F1RhtV6l4v3tUdcGFYJDRb+I GOJ7/sF+QHiEyfkWoEWLwdhxD79RtJICSdmj3J7rcvDvVyxGoV1svaFBY2r5EYadbx/7 y5Wo6d9+W6gON3pqr2jxFzOfEGlm4K2Wuo6qKZ3LpTQ07vBX3ZCprU42xq91L8xU8R7J 8qBrlAUUuWCIxInXSTbOFqSiIOd6uAMC3wXxroGTVuobQ8Um7KD7hH8EDBeZL3s+/Q8p 1zMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=0Ppoh0EjNesnuj1YJt9CA8r9KniSI7FETM61XU+g3hY=; b=I32FnEmoG5faAiZ9BN6omr7iXlVzzeqWyMAOSwsHVMowBhVglhgqFTzezAOvxbLjTk gSp/T0wzHu18f+jcpguVKhISxxBAuFv1ckpGBNOKOAO2pliE9YOeQOPafGGvZ18pngwa cy7qKDL9La9Kg6ELBKx7GHJI+ru3f1ATJ54zFQZ2do12n7Lm/W5jGOtaIEN8ZGZ+x6vB M3Ub3t4lsjnl2uZRikH1oOksNUir4QUUCdQdCRWniIVcLqtOSX5nYjzyX7IYiHyqpXAP /w1xEgvXQmP7W5exHNwx35Je9qKWr7CfKcE29VtYU+qlk4IIUDAjppu+lh4IpHauTu4b HKEg== 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 r21si18976ljc.79.2021.05.12.07.49.09; Wed, 12 May 2021 07:49:39 -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 S231386AbhELOoy (ORCPT + 99 others); Wed, 12 May 2021 10:44:54 -0400 Received: from pegase2.c-s.fr ([93.17.235.10]:53807 "EHLO pegase2.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231380AbhELOoy (ORCPT ); Wed, 12 May 2021 10:44:54 -0400 Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4FgHbh5mDJz9sdw; Wed, 12 May 2021 16:43:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XhpERfMAMcjt; Wed, 12 May 2021 16:43:44 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4FgHbh4nsRz9sdc; Wed, 12 May 2021 16:43:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 83D6C8B7F4; Wed, 12 May 2021 16:43:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id KNm8b5FGVtrW; Wed, 12 May 2021 16:43:44 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 10B2E8B7F3; Wed, 12 May 2021 16:43:44 +0200 (CEST) Subject: Re: [PATCH] powerpc: Force inlining of csum_add() To: Segher Boessenkool Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20210511105154.GJ10366@gate.crashing.org> <20210512143105.GW10366@gate.crashing.org> From: Christophe Leroy Message-ID: <2623fe98-7a73-f7a2-bcba-2d668d00ffd0@csgroup.eu> Date: Wed, 12 May 2021 16:43:33 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210512143105.GW10366@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? Christophe