Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1249290ybl; Mon, 2 Dec 2019 00:04:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzJYPdFdN6J5m466X3TTryIJn4KLmr+1+baqYvgM4f+3Ejc2sCgVd8EtX+fHKawS3zzo0rd X-Received: by 2002:a50:930c:: with SMTP id m12mr62168416eda.132.1575273869032; Mon, 02 Dec 2019 00:04:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575273869; cv=none; d=google.com; s=arc-20160816; b=kxrrYf3v5+bMPL7mdDQBe/dn4uEMMfCKdOvbGRR3tkNKOGG9QlPAcfDpPYLTsSTvJH ZTSrmtBCQe7jjdc/KdH/rcYV+THqsQSTRWnWH+H+ijTC7pnJCLVkOBADI2xJsC6j2vLl 1jkclbhQOPbWBxOSV41cPHidBK2lQ62U0S6sYsoZJrTkW3pYCDoFHen5jVl1Y1Ubt1Hh 2ZJ5pk66QlmKgDgckNJTUoCx9+ITXP2KhvFjeROnbTO2Zc2g24GnNnSscdCeH4y66Sop SsoqD1L+YWg4+Wj6WaVXrWqjL0eRiq2TOgQZohrsr084J7KWkBeDLMFnZkR0WnYSm48E Af+w== 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=R0DzOApn8sfF6b/fIqfYO/uTeigqDJ/6K0S4/0UVFJk=; b=rrDBGKO6CtAOjdMMa13j7aoAmmh8rktOSRVhSv9i10/wUbmvidlC5KfRDNBr/l614E mGjw8OEOFJ8/lKuWlBIXQQfCk1X7E6tToJlHI6tj9x5wlm87D/UWqkfLSyZ7ly+xdKmi SDMBtUh90Wx2em/ZADgDcBpgcon8HUqJsprgoGYB22meylm/rpKtGvlUiLSIJyZpY48X XNWU4Fng8PrVGXv934Dp15CMqCRpPmYtlFcaXYH1roV7QukpPFQrhKcDCzegqxoR+rDo xNE/BWeuWFRf+M2+j2K6DxqKfjJzbq8Hq32uph+VejChpkcpBgr2e9j48m9B0x968m78 ZgsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=dz3vZEta; 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 a15si9577519edv.325.2019.12.02.00.04.05; Mon, 02 Dec 2019 00:04:29 -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=dz3vZEta; 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 S1726210AbfLBICP (ORCPT + 99 others); Mon, 2 Dec 2019 03:02:15 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:36113 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbfLBICP (ORCPT ); Mon, 2 Dec 2019 03:02:15 -0500 Received: from localhost (mailhub1-ext [192.168.12.233]) by localhost (Postfix) with ESMTP id 47RHdX1YxWz9txsq; Mon, 2 Dec 2019 09:02:08 +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=dz3vZEta; 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 Nugd4Uyqk_4B; Mon, 2 Dec 2019 09:02:08 +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 47RHdX0WK3z9txsn; Mon, 2 Dec 2019 09:02:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1575273728; bh=R0DzOApn8sfF6b/fIqfYO/uTeigqDJ/6K0S4/0UVFJk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=dz3vZEtadKms4NZFO1roHSBY77uzZ4IfNjpoaJ37R8kS7ULKFb7jlQ8u9G4hLdEvn nRQ/4smn+bRRPHn2mXT6WrHGYhdvlRAANdOw5gh0HPPOvewfgcAHAWRABgChxxXmAp e8xvSG7vOaqC5RZ2eqPwjrm9Sf+iGEL/CMn5LhCg= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A9F248B79B; Mon, 2 Dec 2019 09:02:12 +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 kizfJgE835l1; Mon, 2 Dec 2019 09:02:12 +0100 (CET) Received: from po16098vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.230.103]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5ED478B770; Mon, 2 Dec 2019 09:02:12 +0100 (CET) Subject: Re: [PATCH v3 4/8] powerpc/vdso32: inline __get_datapage() To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Arnd Bergmann References: <9c9fe32df8633e6ba8e670274dc3eef82a1b5a65.1572342582.git.christophe.leroy@c-s.fr> <874kywbrjv.fsf@mpe.ellerman.id.au> <871ru0beke.fsf@mpe.ellerman.id.au> <87sgm8zhw0.fsf@mpe.ellerman.id.au> From: Christophe Leroy Message-ID: <688fe6fa-5bca-4fa6-dda3-603e515be60d@c-s.fr> Date: Mon, 2 Dec 2019 08:02:11 +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: <87sgm8zhw0.fsf@mpe.ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28/2019 05:31 AM, Michael Ellerman wrote: > Christophe Leroy writes: >> Le 22/11/2019 à 07:38, Michael Ellerman a écrit : >>> Michael Ellerman writes: >>>> 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 >>>> >>>> This doesn't build with gcc 4.6.3: >>>> >>>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S: Assembler messages: >>>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S:41: Error: unsupported relocation against __kernel_datapage_offset >>>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S:86: Error: unsupported relocation against __kernel_datapage_offset >>>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S:213: Error: unsupported relocation against __kernel_datapage_offset >>>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S:247: Error: unsupported relocation against __kernel_datapage_offset >>>> make[4]: *** [arch/powerpc/kernel/vdso32/gettimeofday.o] Error 1 >>> >>> Actually I guess it's binutils, which is v2.22 in this case. >>> >>> Needed this: >>> >>> diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h >>> index 12785f72f17d..0048db347ddf 100644 >>> --- a/arch/powerpc/include/asm/vdso_datapage.h >>> +++ b/arch/powerpc/include/asm/vdso_datapage.h >>> @@ -117,7 +117,7 @@ extern struct vdso_data *vdso_data; >>> .macro get_datapage ptr, tmp >>> bcl 20, 31, .+4 >>> mflr \ptr >>> - addi \ptr, \ptr, __kernel_datapage_offset - (.-4) >>> + addi \ptr, \ptr, (__kernel_datapage_offset - (.-4))@l >>> lwz \tmp, 0(\ptr) >>> add \ptr, \tmp, \ptr >>> .endm >>> >> >> Are you still planning to getting this series merged ? Do you need any >> help / rebase / re-spin ? > > Not sure. I'll possibly send a 2nd pull request next week with it > included. > v3 conflicts with 2038 cleanup series from Arnd merged yesterday by Linus (ceb307474506 ("Merge tag 'y2038-cleanups-5.5' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground")) Not seen your Ack in that series. I sent out v4 of my series, rebased on top of 2038 cleanup series. Christophe