From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v3 4/8] powerpc/vdso32: inline __get_datapage()
Date: Wed, 27 Nov 2019 15:47:56 +0100 [thread overview]
Message-ID: <dd5e359b-5864-f8e3-876a-ec606b51eb65@c-s.fr> (raw)
In-Reply-To: <871ru0beke.fsf@mpe.ellerman.id.au>
Hi Michael,
Le 22/11/2019 à 07:38, Michael Ellerman a écrit :
> Michael Ellerman <mpe@ellerman.id.au> writes:
>> Christophe Leroy <christophe.leroy@c-s.fr> 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 <christophe.leroy@c-s.fr>
>>
>> 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
next prev parent reply other threads:[~2019-11-27 14:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 9:53 [PATCH v3 0/8] powerpc/vdso32 enhancement and optimisation Christophe Leroy
2019-10-29 9:53 ` [PATCH v3 1/8] powerpc/32: Add VDSO version of getcpu on non SMP Christophe Leroy
2019-10-29 9:53 ` [PATCH v3 2/8] powerpc/vdso32: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE Christophe Leroy
2019-11-20 12:42 ` Michael Ellerman
2019-11-20 15:17 ` Christophe Leroy
2019-11-20 23:53 ` Michael Ellerman
2019-10-29 9:53 ` [PATCH v3 3/8] powerpc: Fix vDSO clock_getres() Christophe Leroy
2019-10-29 9:53 ` [PATCH v3 4/8] powerpc/vdso32: inline __get_datapage() Christophe Leroy
2019-11-22 1:58 ` Michael Ellerman
2019-11-22 6:38 ` Michael Ellerman
2019-11-27 14:47 ` Christophe Leroy [this message]
2019-11-28 5:31 ` Michael Ellerman
2019-12-02 8:02 ` Christophe Leroy
2019-10-29 9:53 ` [PATCH v3 5/8] powerpc/vdso32: Don't read cache line size from the datapage on PPC32 Christophe Leroy
2019-10-29 9:53 ` [PATCH v3 6/8] powerpc/vdso32: use LOAD_REG_IMMEDIATE() Christophe Leroy
2019-10-29 9:53 ` [PATCH v3 7/8] powerpc/vdso32: implement clock_getres entirely Christophe Leroy
2019-10-29 9:53 ` [PATCH v3 8/8] powerpc/vdso32: miscellaneous optimisations Christophe Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd5e359b-5864-f8e3-876a-ec606b51eb65@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).