Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp765169ybg; Sat, 26 Oct 2019 06:57:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyX02iueHr44XLHGK255nCIUVfcRa957EurkeGn4JMTtPb8KLPrfIi/bxo2gj57VSDO9IDd X-Received: by 2002:a50:8859:: with SMTP id c25mr9480385edc.253.1572098258707; Sat, 26 Oct 2019 06:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572098258; cv=none; d=google.com; s=arc-20160816; b=JLDFLY8L0MhCfAITXDEfMudcqFmLiLgh/DN1MSLX32/dqrT/4P1JjcziEoyKdi1OtN WkkTqOERKHQaRComwhXRnwv9xUkAcl6EZgaOuUrHahRuAYbYhfrN5PNeFFbFJ7N6Lx/U clIfA05EIoMR6kk/ix11IOIFVQrHoEtJ4BoMHUARNWtu9aAeur09mOmNtrjGjefZJ/HH ybl1JyWdPZLycKAJyoak02MGnqMnrekcONtOLYOMkrIG6n18qpZdJzvCIR7ZDOPajvd7 UPO7YY7PwhHAZ8aYYlVyQTiLvWsTsaXgW8zU0uI+kOR+Xc8+NC0gZEzA92/aOtWUTZ75 n65Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=/FMlGiNICgRa8jqMFWNgrr3w5cx0YRg8udD8a+0IL0g=; b=G+7bHZ2Ikh5g3nhAOyWjdPCGeUSL9FUmpQPjIVse2lH6/ZrPbqXkS9XQcug0lpf70+ 0uAmG6OnxgU9o4FfrbYJxmsVHVcPtmijsxEz6hUtsCbua40QiQ4dUMtUVPbWaANYtI6U I6JL3yZ9W17JLrwvF49EKGiWfm1v1Wny96jMVdF3i50qHG2srfzdSk2R1Zi/Y4sm6JLF SsXLmjSR1ynRJjI/1nBEB0K6W5oLoC9M0KGth2nHWFHhrFtXyHJiw3WYjd0uMgkNS7wB 0lcpdo5QuApZiOVYQbxmIcKgxWX1BBk0BWhdXDenmYvnkrz3oTLbUyjSInyPMfglRE0Y HtSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="UdKa/EIa"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si2717580ejj.247.2019.10.26.06.57.13; Sat, 26 Oct 2019 06:57:38 -0700 (PDT) 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=@kernel.org header.s=default header.b="UdKa/EIa"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726527AbfJZNzm (ORCPT + 99 others); Sat, 26 Oct 2019 09:55:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:55660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726256AbfJZNzl (ORCPT ); Sat, 26 Oct 2019 09:55:41 -0400 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BF8A621897 for ; Sat, 26 Oct 2019 13:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572098141; bh=oS8AafU4UoR1Cdt5q1QkipV0ZVxN87r+AIY8DNgHUts=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UdKa/EIasgUwWUWKLVUZjsocCCXKaIIKQvHCKkWsta4ac76dgl2yQ/T8MABrC3sI7 QT4WVsaHMploW8g3OvhBvq4nUFVqX2zrXBy68w8n3je7YCvffgOqbOQqcXWLA2hKIV C5TuFXmNCXo9w+NkE8kU8xCo3ymWDEd1iMs2nCNo= Received: by mail-wr1-f53.google.com with SMTP id q13so5310888wrs.12 for ; Sat, 26 Oct 2019 06:55:40 -0700 (PDT) X-Gm-Message-State: APjAAAWhrBEXCMSFNbWiIKiWXrGk+FVTpaBjiPCAUStMrxG9DQcS3MQM epN1Z2cMBNwZSp9ebYLeqfLGApXKxRJoRENgfBrsBA== X-Received: by 2002:adf:f04e:: with SMTP id t14mr7762143wro.106.1572098139231; Sat, 26 Oct 2019 06:55:39 -0700 (PDT) MIME-Version: 1.0 References: <8ce3582f7f7da9ff0286ced857e5aa2e5ae6746e.1571662378.git.christophe.leroy@c-s.fr> <95bd2367-8edc-29db-faa3-7729661e05f2@c-s.fr> In-Reply-To: <95bd2367-8edc-29db-faa3-7729661e05f2@c-s.fr> From: Andy Lutomirski Date: Sat, 26 Oct 2019 06:55:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] powerpc/32: Switch VDSO to C implementation. To: Christophe Leroy Cc: Thomas Gleixner , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Vincenzo Frascino , Andrew Lutomirski , LKML , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 22, 2019 at 6:56 AM Christophe Leroy wrote: > > > >>> The performance is rather disappoiting. That's most likely all > >>> calculation in the C implementation are based on 64 bits math and > >>> converted to 32 bits at the very end. I guess C implementation should > >>> use 32 bits math like the assembly VDSO does as of today. > >> > >>> gettimeofday: vdso: 750 nsec/call > >>> > >>> gettimeofday: vdso: 1533 nsec/call > > > > Small improvement (3%) with the proposed change: > > > > gettimeofday: vdso: 1485 nsec/call > > By inlining do_hres() I get the following: > > gettimeofday: vdso: 1072 nsec/call > A perf report might be informative.