Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5614874ybc; Wed, 27 Nov 2019 06:52:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxVwtnYhikKGvfAIBt5sFe8OAQXrGE3C6lyUVpMom7ga9kegBoWAI1u2H1XvmFkRsHy2XHf X-Received: by 2002:aa7:c047:: with SMTP id k7mr33111893edo.58.1574866350273; Wed, 27 Nov 2019 06:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574866350; cv=none; d=google.com; s=arc-20160816; b=Kap5tMdeQnVa8pOsMREG9nDjohH23YRF5+CQ4jjYVyf2xfhNCXJiFJrLLAhRWAmPxV zE9y6qHRAn4bFZjMrT805JQIodgZ2GpAh4tlwq/2v83g9Kw2ZmEFb+iXeRyNz6EiDlpr C14lGdp62ApeJ7yVNNkHth95gmbfpstV8vWVvg4l1NcxVFRTsIxnXWMqqe1nck38bcab 3CtUtzE76XpQHVwpqhHIyG82xNZKos6E/ElXE2wRDXyRsktyMBiL1xP1csyucL5kEMuo IPulnM9ywHiJ5vX/GY0QfwMhJ/2WFFZvT1iCfyANX9YA0dn8dfRtJNxvPSFISlQxOlSL kvDQ== 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=1W4pkRYIjtnmMfpsH0+nUm20obpBPvjB7NQtbwdPbAk=; b=h8SK4x5mBYJXD0zzyG4kq7QH0/hB76e6fTJ84Cc2nQZ+mPmWJOw2az/g22TQsr0+tv N0GNKQG8lrQnbymhyDYY2WcGf+AGInRQgiCsDn8Jd4t4vb8gOJxaTq+tJ+qKFPNuyaqu i/CNHsoVkToZEziOGwDEBMWs3uEeLwmVidIJ8Pj/o7YnrKitX17/lmAbctG7IC4sYFsZ 3X5Q7mbSfkRK/RWsqHWxkNeK1GdWggDPydX1JkeUA4cytO55lqo/KRfm/9gEgPHv8vC0 a5oyPbnhNoy3zxcl7sU18fi5bWNhtVA/Fjre8oiLC5/6aocXw9wmapZV/Ss25OkTfutY 0a6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=qShOcQlp; 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 y21si3017971edi.386.2019.11.27.06.52.05; Wed, 27 Nov 2019 06:52:30 -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=qShOcQlp; 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 S1727059AbfK0Or7 (ORCPT + 99 others); Wed, 27 Nov 2019 09:47:59 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:3892 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726591AbfK0Or7 (ORCPT ); Wed, 27 Nov 2019 09:47:59 -0500 Received: from localhost (mailhub1-ext [192.168.12.233]) by localhost (Postfix) with ESMTP id 47NNt42w4mz9v0w8; Wed, 27 Nov 2019 15:47:56 +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=qShOcQlp; 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 8sFkpU0CXzhx; Wed, 27 Nov 2019 15:47:56 +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 47NNt41sghz9v0w7; Wed, 27 Nov 2019 15:47:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1574866076; bh=1W4pkRYIjtnmMfpsH0+nUm20obpBPvjB7NQtbwdPbAk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=qShOcQlpbWQM5NtWwBZbdajuJz0eN5wq724KlbQz34m8lFL7s4RHqwM8jlaCWdJIL QI2JlUtzjP1dhjX/CqWwIHMlfgttBdUGO0026MqcIXsMafnMvZGnQBT+S6IAIPIhWX J5+OtTVJMQb+DY2Bo+5kGyf7ptCdtz2BHTd7UBIM= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B38BE8B862; Wed, 27 Nov 2019 15:47:57 +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 5E_wXZJsK45e; Wed, 27 Nov 2019 15:47:57 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 16C128B85A; Wed, 27 Nov 2019 15:47:57 +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 References: <9c9fe32df8633e6ba8e670274dc3eef82a1b5a65.1572342582.git.christophe.leroy@c-s.fr> <874kywbrjv.fsf@mpe.ellerman.id.au> <871ru0beke.fsf@mpe.ellerman.id.au> From: Christophe Leroy Message-ID: Date: Wed, 27 Nov 2019 15:47:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <871ru0beke.fsf@mpe.ellerman.id.au> 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 Michael, 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 ? Christophe