[PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-08-11 Thread Santosh Sivaraj
Current vDSO64 implementation does not have support for coarse clocks (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls back to system call, increasing the response time, vDSO implementation reduces the cycle time. Below is a benchmark of the difference in execution time with and

Re: [PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-07-23 Thread kbuild test robot
Hi Santosh, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.13-rc1 next-20170721] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-07-22 Thread kbuild test robot
Hi Santosh, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.13-rc1 next-20170721] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-07-21 Thread Benjamin Herrenschmidt
On Fri, 2017-07-21 at 10:10 +0530, Santosh Sivaraj wrote: > In case of a bogus clock id, the default case sets 'ret' to -1, which forces > it > to fallback to the syscall. > > I think the solution is probably to do the syscall fallback in asm, and > > everything else in C. > > Ok. That's what

Re: [PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-07-20 Thread Santosh Sivaraj
* Michael Ellerman wrote (on 2017-07-20 23:18:26 +1000): > Santosh Sivaraj writes: > > > Current vDSO64 implementation does not have support for coarse > > clocks (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls > > back to system

Re: [PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-07-20 Thread Anton Blanchard
Hi, > > +static notrace int gettime_syscall_fallback(clockid_t clk_id, > > +struct timespec *tp) > > +{ > > + register clockid_t id asm("r3") = clk_id; > > + register struct timespec *t asm("r4") = tp; > > + register int nr asm("r0") =

Re: [PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-07-20 Thread Segher Boessenkool
On Fri, Jul 21, 2017 at 07:17:39AM +1000, Benjamin Herrenschmidt wrote: > > Great patch! Always good to see asm replaced with C. > > Yeah ewll ... when C becomes some kind of weird glorifed asm like > below, I don't see much of a point ;-) Yeah. > > > diff --git

Re: [PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-07-20 Thread Benjamin Herrenschmidt
On Thu, 2017-07-20 at 23:18 +1000, Michael Ellerman wrote: > Santosh Sivaraj writes: > > > Current vDSO64 implementation does not have support for coarse > > clocks (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls > > back to system call. Below is a

Re: [PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-07-20 Thread Michael Ellerman
Santosh Sivaraj writes: > Current vDSO64 implementation does not have support for coarse > clocks (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls > back to system call. Below is a benchmark of the difference in execution > time with and without vDSO

[PATCH] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-07-20 Thread Santosh Sivaraj
Current vDSO64 implementation does not have support for coarse clocks (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls back to system call. Below is a benchmark of the difference in execution time with and without vDSO support. (Non-coarse clocks are also included just for