[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <688fe6fa-5bca-4fa6-dda3-603e515be60d@c-s.fr>
Date: Mon, 2 Dec 2019 08:02:11 +0000
From: Christophe Leroy <christophe.leroy@....fr>
To: Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>
Cc: linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v3 4/8] powerpc/vdso32: inline __get_datapage()
On 11/28/2019 05:31 AM, Michael Ellerman wrote:
> Christophe Leroy <christophe.leroy@....fr> writes:
>> Le 22/11/2019 à 07:38, Michael Ellerman a écrit :
>>> Michael Ellerman <mpe@...erman.id.au> writes:
>>>> Christophe Leroy <christophe.leroy@....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@....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 ?
>
> 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
Powered by blists - more mailing lists