Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2651708ybl; Mon, 20 Jan 2020 06:57:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzv8GIZ2E4Z4SB1oTMjA06v/MxP4u/fjwzPHbdzZDlTGlsAGCX/BtbtCeXOlA1TsqlMyTB3 X-Received: by 2002:aca:72d0:: with SMTP id p199mr13568363oic.40.1579532270755; Mon, 20 Jan 2020 06:57:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579532270; cv=none; d=google.com; s=arc-20160816; b=xjSDJBbJvFU9P96hAHFO3hPIS2YKY9PENnFrJOA93chrQk/R4dhFqlFGiU9jfOb1Y8 20aGTwQq8n3Pu0escv2bGWmZbVvzZrVSyZ+FihQ2lWwVFd3TIWHmqRS+6rvHN3IfOjX5 tabr7xRB1wAJTV+vwCEvAO3QsJgy6+VGXURy1IZky0stuiJpH1V6YAue+8a28+eFidCo 3BVFNtwRNE/xx7YJdagpUE5xPUjpe09p38CpY1EKwCckmsyN9AMoKdhrXyp4Bb3qhUpo hn64ZeViH61+t8cGwdNO/Tr0fDVkqJaDCAzzc8C5zNweuq0SVTZ+Mh2/Kf2rE51xVTZB ZpgQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=7a7pH0OuPJ37Tokg90N9GbyIEViwQm3IBxxlGbRco4U=; b=G6d+04VPcCAUkovSOrg5wisuPn3xx0SENlGCQeWi4q0umyOcbpUvDd1WEKBTicuLVg xq+hYyyTjl3N6uBqsXue5oYX5M0yiU8Vx6XI1shtw9QAPThpMYz9J5jFe8qdKzyVG3kk ilXk+Hcw+bn0ESnHGQOZ+8HgBC+Y4if96R3vLD1UBRcQlJHQbjt+8bg61QcIMCXVOgEy 1talw/f+DG95Q4v2SQ8erlumHn5EC3ZKdkNRf7QO3S6MhxBXPZJCBlZqoKhpMzRugDjW jeJONU8Snv4qysVr7cDfmlgMMSCsM+6z/A/pdJsAo9Ep0mW+UZrg/P8tstHTnMH++Muu ALQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=iuBLQmw4; 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 v14si19454906oto.127.2020.01.20.06.57.38; Mon, 20 Jan 2020 06:57:50 -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; dkim=pass header.i=@c-s.fr header.s=mail header.b=iuBLQmw4; 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 S1727573AbgATO4r (ORCPT + 99 others); Mon, 20 Jan 2020 09:56:47 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:56792 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726860AbgATO4q (ORCPT ); Mon, 20 Jan 2020 09:56:46 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 481ZWC44c9z9v1xD; Mon, 20 Jan 2020 15:56:39 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=iuBLQmw4; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id kzvItXeAdApu; Mon, 20 Jan 2020 15:56:39 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 481ZWC2dgDz9v1xC; Mon, 20 Jan 2020 15:56:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1579532199; bh=7a7pH0OuPJ37Tokg90N9GbyIEViwQm3IBxxlGbRco4U=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=iuBLQmw4SdLFu8wXBuDZ2Hk+qOZ7RlDsSCIdnPQ/fwTAZttl5QD/WEybExnxVKYpn zKGmHcCaDYFBT0aF1DolPqjYevZoXPMFPjzQfN5g9anMJruv0gr2/LYX0xiPvp2Wln Wbfm7ED4pN8P0a3f4DeDkE6qqIZRKgkXlMJlv6SY= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 50E548B7CA; Mon, 20 Jan 2020 15:56:44 +0100 (CET) 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 7yXE7xArml9v; Mon, 20 Jan 2020 15:56:44 +0100 (CET) Received: from po14934vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.230.100]) by messagerie.si.c-s.fr (Postfix) with ESMTP id F37C98B7BD; Mon, 20 Jan 2020 15:56:43 +0100 (CET) Subject: Re: [RFC PATCH v4 00/11] powerpc: switch VDSO to C implementation. To: Segher Boessenkool Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , nathanl@linux.ibm.com, arnd@arndb.de, tglx@linutronix.de, vincenzo.frascino@arm.com, luto@kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org References: <20200117085851.GS3191@gate.crashing.org> From: Christophe Leroy Message-ID: <3027b6d2-47a9-a871-7c52-050a5f9c6ab7@c-s.fr> Date: Mon, 20 Jan 2020 14:56:00 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20200117085851.GS3191@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On 01/17/2020 08:58 AM, Segher Boessenkool wrote: > Hi! > > On Thu, Jan 16, 2020 at 05:58:24PM +0000, Christophe Leroy wrote: >> On a powerpc8xx, with current powerpc/32 ASM VDSO: >> >> gettimeofday: vdso: 907 nsec/call >> clock-getres-realtime: vdso: 484 nsec/call >> clock-gettime-realtime: vdso: 899 nsec/call >> >> The first patch adds VDSO generic C support without any changes to common code. >> Performance is as follows: >> >> gettimeofday: vdso: 1211 nsec/call >> clock-getres-realtime: vdso: 722 nsec/call >> clock-gettime-realtime: vdso: 1216 nsec/call >> >> Then a few changes in the common code have allowed performance improvement. At >> the end of the series we have: >> >> gettimeofday: vdso: 974 nsec/call >> clock-getres-realtime: vdso: 545 nsec/call >> clock-gettime-realtime: vdso: 941 nsec/call >> >> The final result is rather close to pure ASM VDSO: >> * 7% more on gettimeofday (9 cycles) >> * 5% more on clock-gettime-realtime (6 cycles) >> * 12% more on clock-getres-realtime (8 cycles) > > Nice! Much better. > > It should be tested on more representative hardware, too, but this looks > promising alright :-) > mpc832x (e300c2 core) at 333 MHz: Before: gettimeofday: vdso: 235 nsec/call clock-getres-realtime-coarse: vdso: 1668 nsec/call clock-gettime-realtime-coarse: vdso: 1338 nsec/call clock-getres-realtime: vdso: 135 nsec/call clock-gettime-realtime: vdso: 244 nsec/call clock-getres-boottime: vdso: 1232 nsec/call clock-gettime-boottime: vdso: 1935 nsec/call clock-getres-tai: vdso: 1257 nsec/call clock-gettime-tai: vdso: 1898 nsec/call clock-getres-monotonic-raw: vdso: 1229 nsec/call clock-gettime-monotonic-raw: vdso: 1541 nsec/call clock-getres-monotonic-coarse: vdso: 1699 nsec/call clock-gettime-monotonic-coarse: vdso: 1477 nsec/call clock-getres-monotonic: vdso: 135 nsec/call clock-gettime-monotonic: vdso: 283 nsec/call With the series: gettimeofday: vdso: 271 nsec/call clock-getres-realtime-coarse: vdso: 159 nsec/call clock-gettime-realtime-coarse: vdso: 184 nsec/call clock-getres-realtime: vdso: 163 nsec/call clock-gettime-realtime: vdso: 281 nsec/call clock-getres-boottime: vdso: 169 nsec/call clock-gettime-boottime: vdso: 274 nsec/call clock-getres-tai: vdso: 163 nsec/call clock-gettime-tai: vdso: 277 nsec/call clock-getres-monotonic-raw: vdso: 166 nsec/call clock-gettime-monotonic-raw: vdso: 302 nsec/call clock-getres-monotonic-coarse: vdso: 159 nsec/call clock-gettime-monotonic-coarse: vdso: 184 nsec/call clock-getres-monotonic: vdso: 166 nsec/call clock-gettime-monotonic: vdso: 274 nsec/call Christophe