Re: [PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-22 Thread Santosh Sivaraj
Christophe Leroy writes: > Le 21/08/2019 à 14:15, Segher Boessenkool a écrit : >> On Wed, Aug 21, 2019 at 01:50:52PM +0200, Christophe Leroy wrote: >>> Do you have any idea on how to avoid that bcl/mflr stuff ? >> >> Do a load from some fixed address? Maybe an absolute address, even? >> lwz r3,

Re: [PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-21 Thread Christophe Leroy
Le 21/08/2019 à 14:15, Segher Boessenkool a écrit : On Wed, Aug 21, 2019 at 01:50:52PM +0200, Christophe Leroy wrote: Do you have any idea on how to avoid that bcl/mflr stuff ? Do a load from some fixed address? Maybe an absolute address, even? lwz r3,-12344(0) or similar (that address is

Re: [PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-21 Thread Nathan Lynch
Christophe Leroy writes: > Le 21/08/2019 à 11:29, Santosh Sivaraj a écrit : >> __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 avoi

Re: [PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-21 Thread Segher Boessenkool
On Wed, Aug 21, 2019 at 01:50:52PM +0200, Christophe Leroy wrote: > Le 21/08/2019 à 13:44, Segher Boessenkool a écrit : > >Calls are cheap, in principle... It is the LR stuff that can make it > >slower on some cores, and a lot of calling sequence stuff may have > >considerable overhead of course.

Re: [PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-21 Thread Christophe Leroy
Le 21/08/2019 à 13:44, Segher Boessenkool a écrit : Hi! On Wed, Aug 21, 2019 at 02:59:59PM +0530, Santosh Sivaraj wrote: except for a couple of calls (1 or 2 nsec reduction), there are no improvements in the call times. Or is 10 nsec the minimum granularity?? So I don't know if its even wor

Re: [PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-21 Thread Segher Boessenkool
Hi! On Wed, Aug 21, 2019 at 02:59:59PM +0530, Santosh Sivaraj wrote: > except for a couple of calls (1 or 2 nsec reduction), there are no > improvements in the call times. Or is 10 nsec the minimum granularity?? > > So I don't know if its even worth updating vdso64 except to keep vdso32 and > vds

Re: [PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-21 Thread Santosh Sivaraj
Christophe Leroy writes: > Le 21/08/2019 à 11:29, Santosh Sivaraj a écrit : >> __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 avo

Re: [PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-21 Thread Christophe Leroy
Le 21/08/2019 à 11:29, Santosh Sivaraj a écrit : __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. clock-gett

[PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-21 Thread Santosh Sivaraj
__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. clock-gettime-monotonic: syscall: 514 nsec/call 396 nsec/call c