Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp570514ybv; Wed, 19 Feb 2020 05:09:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyEEGV4K4ug/Ni153xUd357I8UjChLE2ec5yaDE+OWKc6njwv6ub562aEzmAx2SD3AbcTrp X-Received: by 2002:a54:4805:: with SMTP id j5mr2113703oij.29.1582117760317; Wed, 19 Feb 2020 05:09:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582117760; cv=none; d=google.com; s=arc-20160816; b=XyFP2tcMxnbnGue8rDqfOHV7u7zrm2deq3QylRR+JX78kirTxYKkYcU/W6zjGFvyXV J4I52UKCaSCLXFAYGhkug5EjbQ2YCdxpUVg6O4Itu3IhEH3vUylYXp0Xgerrqw0cOrGK SUmJDEs8S0PZZZo7Nki5rP/LfQ3yhX83ZVoUsUN3sYvkK2WTM+mpaFsLzixv1LdtWSuT ivMBLwwcWk8LShVGylTgC8fJwSBrt4tvRdMqkqsKMczbY88J8hJktX0hma51AqwjT+BZ k902qEc2EyjvNkXUrcIwu/g5lPoVOjwvNzcGal6suJDtm+CgV724gvGxZKoR7tE3nQM/ G9Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=aqQ0SD+CYvG7wH0usb55uB67iZc82F0pH4PQVLSvvr8=; b=psbKc6kWFx+CraWegjQZDHUzrETRqh/dwdEXGA6lBVH72Gm65ZHvikVabHm/hjXOs4 ee2WngnTvo4MS/5MdFw4gBHJWesABQuWQs4d2DcpeRQ7wsOh+ebWZUX6C7/PRdHPtb34 O7mI3EDuOIQ8YE3wwtWltQVm3BgTFmoUtbST2hU8oi21gz+pnVEa523d5mW9+lcQFDsx 0fWPjrl0LhweUnInY1JcfiXAnPosXrG5TQNCsmTWvwS8YAOxtnwml+gLvwNjPC0yxOW4 8jU2f3oW/zO+Zu/YrKcyNoHOaf7bMdeDqRRm2tcynQgXQvspIeESinUWVDS+HA3JXULj Wv7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si10125271oia.232.2020.02.19.05.09.07; Wed, 19 Feb 2020 05:09:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727469AbgBSNI5 (ORCPT + 99 others); Wed, 19 Feb 2020 08:08:57 -0500 Received: from gate.crashing.org ([63.228.1.57]:38973 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbgBSNI5 (ORCPT ); Wed, 19 Feb 2020 08:08:57 -0500 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 01JD8ATq027345; Wed, 19 Feb 2020 07:08:10 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 01JD88xt027342; Wed, 19 Feb 2020 07:08:08 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 19 Feb 2020 07:08:08 -0600 From: Segher Boessenkool To: Arnd Bergmann Cc: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Thomas Gleixner , Vincenzo Frascino , Andy Lutomirski , the arch/x86 maintainers , linuxppc-dev , "linux-kernel@vger.kernel.org" , Linux ARM , "open list:BROADCOM NVRAM DRIVER" Subject: Re: Surprising code generated for vdso_read_begin() Message-ID: <20200219130808.GU22482@gate.crashing.org> References: <20200109200733.GS3191@gate.crashing.org> <77a8bf25-6615-6c0a-56d4-eae7aa8a8f09@c-s.fr> <20200111113328.GX3191@gate.crashing.org> <305fcee5-2e1b-ea4d-9a2a-a0e8034d40a8@c-s.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 19, 2020 at 10:52:16AM +0100, Arnd Bergmann wrote: > On Wed, Feb 19, 2020 at 9:45 AM Christophe Leroy > wrote: > > Le 16/02/2020 ? 19:10, Arnd Bergmann a ?crit : > > > On Sat, Jan 11, 2020 at 12:33 PM Segher Boessenkool > > > wrote: > > >> > > >> On Fri, Jan 10, 2020 at 07:45:44AM +0100, Christophe Leroy wrote: > > >>> Le 09/01/2020 ? 21:07, Segher Boessenkool a ?crit : > > >>>> It looks like the compiler did loop peeling. What GCC version is this? > > >>>> Please try current trunk (to become GCC 10), or at least GCC 9? > > >>> > > >>> It is with GCC 5.5 > > >>> > > >>> https://mirrors.edge.kernel.org/pub/tools/crosstool/ doesn't have more > > >>> recent than 8.1 > > >> > > >> Arnd, can you update the tools? We are at 8.3 and 9.2 now :-) Or is > > >> this hard and/or painful to do? > > > > > > To follow up on this older thread, I have now uploaded 6.5, 7.5, 8.3 and 9.2 > > > binaries, as well as a recent 10.0 snapshot. > > > > > > > Thanks Arnd, > > > > I have built the VDSO with 9.2, I get less performant result than with > > 8.2 (same performance as with 5.5). > > > > After a quick look, I see: > > - Irrelevant NOPs to align loops and stuff, allthough -mpcu=860 should > > avoid that. > > - A stack frame is set for saving r31 in __c_kernel_clock_gettime. GCC > > 8.1 don't need that, all VDSO functions are frameless with 8.1 > > If you think it should be fixed in gcc, maybe try to reproduce it in > https://godbolt.org/ (Feel free to skip this step; and don't put links to godbolt (or anything else external) in our bugzilla, please; such links go stale before you know it.) > and open a gcc bug against that. Yes please :-) > Also, please try the gcc-10 snapshot, which has the highest chance > of getting fixes if it shows the same issue (or worse). If it is a regression, chances are it will be backported. (But not to 9.3, which is due in just a few weeks, just like 8.4). If it is just a side effect of some other change, it will probably *not* be undone, not on trunk (GCC 10) either. It depends. But sure, always test trunk if you can. Segher