lkml.org 
[lkml]   [2014]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/4] x86: Use the default ABI for the 32-bit vDSO
From
Date

Am Freitag, den 28.02.2014, 12:19 -0800 schrieb Andy Lutomirski:
> On Fri, Feb 28, 2014 at 7:06 AM, H. Peter Anvin <hpa@zytor.com> wrote:
> > How many internal function calls are there? It seems we should try to avoid those as much as possible by suitable inlining.
>
> There are no non-static calls at all, except for __x86.get_pc_thunk.
> I imagine that gcc is smart enough to improve the calling convention
> to non-externally-visible functions.
>
> Amazingly (to me, anyway), the performance of the 32-bit version seems
> to be within 1 ns or so of the 64-bit version on SNB. I suspect that
> Intel has optimized the crap out of these things.
>

I did some benchmarks on my Core2 Q9300 / 2.53GHz and against
"-mregparm=3 -freg-struct-return" and "-mregparm=0".

The system was boot with idle=poll, the scaling_governor was set to
performance, sched_rt_runtime_us was set to 1000000 and and the
benchmark was executed under realtime priority 99.

For gettimeday() and time() there is no difference, gettimeofday() has
an average runtime of 49 ns and time() needs 11 ns. In the default ABI
is a little bit faster measured in sub-nanoseconds.

For the clock_gettime(CLOCK_MONOTONIC) the results are 47 ns as best
cast for the non default ABI and 46 for the default ABI. In the average
it was more than 1 ns faster.

So the default ABI is faster, in any cases.

One interesting thing is that the HPET code is significant faster when
using kernel parameter idle=poll, it is 953 vs 46 ns, this a factor of
more than 20.

- Stefani



\
 
 \ /
  Last update: 2014-03-01 15:21    [W:0.085 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site