Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp675736ybe; Fri, 13 Sep 2019 04:33:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKP5ul3LTm7HU3ofqleYqzlCVs18zorFvTjhtDAq5zWFnwczErDOUcR7E+sI+3iQWRF7Fj X-Received: by 2002:aa7:d488:: with SMTP id b8mr42211976edr.90.1568374403769; Fri, 13 Sep 2019 04:33:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568374403; cv=none; d=google.com; s=arc-20160816; b=Mxm6GjHtjwJL4dox0n+64eCH2B+cscG2khkrYeP9sqOwIYMynfD6wrBnvmgaN/fZmz tFphGPy2ygf4E9/zBmJyypaRehDVuEqY4mB+zlK9iCNnlVx2kH0wajox4LLkG2LmdgO5 4gzniuQ2tYY3cKQVyrBiIufMdhn6YLOQPzBIR3k2CjXcsArESdZ3EvVrVX7gKobT8iFW Zjy6vyCCE3pfTfaZsbxUUYMIEhQAg9KwWMvLv2KhtRUNUHV6YkvnbekBrJD11Hq1QtXA JdSGkf4b+y4nFdFQ/pHqTfPqTDMI3J9uTsCm7VTtw+fCYvqAT7e5cZ7J8gAdRMSrndy5 90sA== 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=PFT2imOGaHgvctcTYuVwoMHpMQBOPw/fM32Pu9Q/A5I=; b=PlhrPZYk/gBU8xEsF5trAxqp7HBhDs/SJp120k/S5LMuzI9Cfl0vredvMRsWJzGIL3 gqtlymoOeX2zfBvC68jLXXGxh+H7BA1Y2GkeidHu+F2qR2WjZ73Qmkmj2irTU+twbDdA fAEHTvRiHxwPK8qiRGfczyvKOiiQ9Pk2Y6V0W1Kg2t7p8oZveOFbEsD70IT2XBxlXwgZ C79HikjEqIbi/Tb177OEIyCKfTQ9gZVxWJxT64ZSU5ocP3TkFiGH0r7PQ8nNfS4zS7f7 wvtq4LAeWTC5wyFfmYZ6qM38Nd2iWA3o0efvv0uk3RGYs/psZLB9ylshphNnZN7FtVcM dWFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=ZMxtNP3u; 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 gy24si13993369ejb.166.2019.09.13.04.33.00; Fri, 13 Sep 2019 04:33:23 -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=@c-s.fr header.s=mail header.b=ZMxtNP3u; 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 S2387956AbfIMK7g (ORCPT + 99 others); Fri, 13 Sep 2019 06:59:36 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:31868 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387712AbfIMK7g (ORCPT ); Fri, 13 Sep 2019 06:59:36 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 46VCM86DMLz9tykB; Fri, 13 Sep 2019 12:59:32 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=ZMxtNP3u; 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 nFZiyoqF3F_M; Fri, 13 Sep 2019 12:59:32 +0200 (CEST) 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 46VCM854bqz9tyk9; Fri, 13 Sep 2019 12:59:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1568372372; bh=PFT2imOGaHgvctcTYuVwoMHpMQBOPw/fM32Pu9Q/A5I=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZMxtNP3udpntKBpuh9VLJh+f+N+9ucXH19eM2oHhwPzKZED1+FYZoTdaHiSPEKS8c +Uq4KUGDPyQvva3HWfPVEw7omeVxY3wUy4UuX/Gimy7XPpFOcjkQibpmfb8MFxElIB O7Np2Zi50vPPkPhKPAqNaZfpvxccexmeWo5bRhiE= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id EA20D8B987; Fri, 13 Sep 2019 12:59:33 +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 56Gk8pTuWhWo; Fri, 13 Sep 2019 12:59:33 +0200 (CEST) Received: from [172.25.230.101] (po15451.idsi0.si.c-s.fr [172.25.230.101]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C99078B958; Fri, 13 Sep 2019 12:59:33 +0200 (CEST) Subject: Re: [PATCH v2 4/8] powerpc/vdso32: inline __get_datapage() To: Santosh Sivaraj , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <194fb7bc973ef2ce43016c97dd32f2b2dcbae4e7.1566491310.git.christophe.leroy@c-s.fr> <87h864iiq9.fsf@santosiv.in.ibm.com> From: Christophe Leroy Message-ID: Date: Fri, 13 Sep 2019 12:59:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87h864iiq9.fsf@santosiv.in.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Santosh, Le 26/08/2019 à 07:44, Santosh Sivaraj a écrit : > Hi Christophe, > > Christophe Leroy writes: > >> __get_datapage() is only a few instructions to retrieve the >> address of the page where the kernel stores data to the VDSO. >> >> By inlining this function into its users, a bl/blr pair and >> a mflr/mtlr pair is avoided, plus a few reg moves. >> >> The improvement is noticeable (about 55 nsec/call on an 8xx) >> >> vdsotest before the patch: >> gettimeofday: vdso: 731 nsec/call >> clock-gettime-realtime-coarse: vdso: 668 nsec/call >> clock-gettime-monotonic-coarse: vdso: 745 nsec/call >> >> vdsotest after the patch: >> gettimeofday: vdso: 677 nsec/call >> clock-gettime-realtime-coarse: vdso: 613 nsec/call >> clock-gettime-monotonic-coarse: vdso: 690 nsec/call >> >> Signed-off-by: Christophe Leroy >> --- >> arch/powerpc/kernel/vdso32/cacheflush.S | 10 +++++----- >> arch/powerpc/kernel/vdso32/datapage.S | 29 ++++------------------------- >> arch/powerpc/kernel/vdso32/datapage.h | 11 +++++++++++ >> arch/powerpc/kernel/vdso32/gettimeofday.S | 13 ++++++------- >> 4 files changed, 26 insertions(+), 37 deletions(-) >> create mode 100644 arch/powerpc/kernel/vdso32/datapage.h > > The datapage.h file should ideally be moved under include/asm, then we can use > the same for powerpc64 too. I have a more ambitious project indeed. Most of the VDSO code is duplicated between vdso32 and vdso64. I'm aiming at merging everything into a single source code. This means we would have to generate vdso32.so and vdso64.so out of the same source files. Any idea on how to do that ? I'm not too good at creating Makefiles. I guess we would have everything in arch/powerpc/kernel/vdso/ and would have to build the objects twice, once in arch/powerpc/kernel/vdso32/ and once in arch/powerpc/kernel/vdso64/ Christophe