Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp401893ybv; Wed, 19 Feb 2020 01:54:13 -0800 (PST) X-Google-Smtp-Source: APXvYqwNWwJ3MiKmNtzrYT7Is9adth+wd4qPWJ6t3MwcbThkkFTdaaQuK8fvcI72chBV8oEYgpJs X-Received: by 2002:aca:ec46:: with SMTP id k67mr3868659oih.43.1582106053098; Wed, 19 Feb 2020 01:54:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582106053; cv=none; d=google.com; s=arc-20160816; b=Cgta9jPDrLJLNZ7/yER1UsbFslcBsKnknf6J8mzkCBWBcurE40fXJw6FdZZ01J3rIF c0d40+fgZGcGzVf8kwv6uxQv/U/MSvfWztSeERw3cbPek69hjrILE4QIOq70TuNuFrOG LymaTQMK2izYhMsXWUeKzRMWmkjHkXda8A5b8xyOBEuGU/Gg1ofwTk9WkHBmsJWPDoG/ H3uzIJmV0UGSUFRZX/D00Fyji7TOJjBwdISeGyf9xz+5MUYeqzSFFmApH0A4XhWbzXmA lwIlvjJ3cM2C3IsmWRXtmS24d/ruT9tGjWG+iDzDBpCBAkuRjvD0iOOpxj0ULOTG3eW5 eemw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=UdzuE0hea5/UC2y2gLCNi5tRU00O6Q37byLZoFpeo+E=; b=WxijJDEwlwbTiKSh4KlFErYigIT1bnwToQSYfUFHugnP06078BqGqVImRpu7QNbsFn A06LMqv8ZcE0Dkp93eLLb6jq7J8R/a5awmGrtQFN2116DYtj8dXG16lDTrzGYzId5wCm 98VUUF6ixmaHoqzwrXHJBkgNIaAGRsATnRLGGY7ovGzFCI0o6Lip5PmcTRf52ZA9OWA7 qQf3lEwluoJK9uH/tHIUe0UCGPzcF3I8wPVWkrSCrgT8UZ7fxs9c8U+aVFcCCbTHiPZk /Jj//ENLCBz6duqSKzE40ZVGRDedqfEfAFusrQDh73TTQgSpFy9T8WmVG4IOH/SAlqE+ ERBQ== 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 k19si841657otr.52.2020.02.19.01.54.00; Wed, 19 Feb 2020 01:54:13 -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 S1726497AbgBSJwf convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 Feb 2020 04:52:35 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:43719 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbgBSJwe (ORCPT ); Wed, 19 Feb 2020 04:52:34 -0500 Received: from mail-qk1-f178.google.com ([209.85.222.178]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPSA (Nemesis) id 1Mmhs6-1jlyJ51ItK-00jnKw; Wed, 19 Feb 2020 10:52:33 +0100 Received: by mail-qk1-f178.google.com with SMTP id u124so21910451qkh.13; Wed, 19 Feb 2020 01:52:33 -0800 (PST) X-Gm-Message-State: APjAAAWcLSIIx8i5+sfpHcLdtgKtlQCdUUriQ1VAFclMlEZdJ0Xanf0Y 3YSowuPIznniXF6K04m0cULmZUWKkDnw9YPzTJY= X-Received: by 2002:a05:620a:1530:: with SMTP id n16mr22824472qkk.394.1582105952127; Wed, 19 Feb 2020 01:52:32 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <305fcee5-2e1b-ea4d-9a2a-a0e8034d40a8@c-s.fr> From: Arnd Bergmann Date: Wed, 19 Feb 2020 10:52:16 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Surprising code generated for vdso_read_begin() To: Christophe Leroy Cc: Segher Boessenkool , 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" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Provags-ID: V03:K1:KfAcI+gmei7MEogTHDFUMd8r6p43ZGnpPPhbMyVd38ltGLhQ+/C ndqCjVB3FVXe5vp1kY/yjjKmGeOk8b+Egk2k2n5HlVk213lpmmkUj4gFRdddOjdAphhbQ5L lG6idmDOjNwUbarIQ83wl0SovEwmdEFLQNPrn18m5cSTe/3KxY/myeW/X6zLQ0Zg8rap4f6 /SKF4iu4AJ8GBkxgX+2rw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:MhDAhJpzmlU=:DjPodyAtMoLFwqgep3fd1v XDckU16XYd5HBY3MqlOKv7C03hN20ucrMu0tSrSxsBlQzLJG4C976PtM4MmLD2Tbk0Wrp8kIJ 8Riq5depe7w8YRDkwpzoc2HdzfQWdSpXijJSnV8tksY2eYkNvONAbhXOsrSipomkamamRDBJW 0kTw8IRBibFRVxxoE8l7l/oagyl8srBT0kNWRHf9GsmN064qlJf9FSHfEPGAAfOXGhrgT6uM1 TjTNADH7wOa75N0+ICyjwfl4mSbffjH9yqnRGvfh8qBuetnQW/W4nd8VGA15hFbWivtFKLR2a kTxp2SyUh60ANYbFDYHT4Or2BSu/aJ7SKuTpPPcXOBofBj1sPnoKAaUxV+SmS2k0zB+9nz2Ox 0wl0Uxt9NpIGqXNcBVxl+HUqdgw0pnvNRKWwJwgLJVrbf4l+0WSIR2mIitQUf7iJx8DWgl34P kMPoQmVI4Vouldx6ANUMgD7ZEeLl2MXCq6JWoVizJu5Jz+ds8AyAR74LS7JldkDm6CK+TbT2/ NnXZNE7JyGRKuRgKdbJ/qwzLM5nnfwqpbICfmmPnZ0Zb3AJbXSlwr+kudiB2ltlrpoATPuIqm cIm9LAMY6Hw/UdKYbV6jCVlof5PzIoRDmBSYepgt1VMvJJB0aGY54vJaNrXZ6CMeOoeALccH0 UfaX1FyfJavjuhhaSgpeKqgdG+FMchw4dyeyTazJOI7wqoPLXI7Nv0Tf5I4dAb9S5m3Bgkgln W4Knc8n89vHn+ftkP6A2o+phyIXhA/pavmRVSPKSGA755c3DtDgYbs7UBECfhfDOF2DMsOnDl GciNkSl4WuQtylVJlIJSfGXtG+cTNL5qJUC9Q/dmEnfk3iSY7k= 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 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/ and open a gcc bug against that. Also, please try the gcc-10 snapshot, which has the highest chance of getting fixes if it shows the same issue (or worse). Arnd