[PATCH 2/2] Add VDSO version of sched_getcpu on powerpc
Ryan S. Arnold
ryan.arnold@gmail.com
Mon Jan 7 21:23:00 GMT 2013
On Sun, Jul 8, 2012 at 8:28 PM, Anton Blanchard <anton@samba.org> wrote:
>
> The kernel patch has been submitted and is in the review process.
> Results on a POWER7 show the speedup of a sched_getcpu call:
>
> baseline: 538 cycles
> vdso: 30 cycles
>
> 2012-07-09 Anton Blanchard <anton@samba.org>
>
> * sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c: New file.
> * sysdeps/unix/sysv/linux/powerpc/Versions: Add __vdso_getcpu
> * sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h: Likewise.
> * sysdeps/unix/sysv/linux/powerpc/init-first.c: Likewise.
>
This tests out fine. I'm pretty sure that we don't need to check for
kernel availability (e.g., __ASSUME). I had to adjust the patch to
not presume that the __kernel_get_tbfreq change went in beforehand.
The VSYSCALL wrapper still needs to be fixed to allow a long long int
return type before that can go in. The compiler folks are looking at
a code gen issue and it should be ready shortly.
Ryan
More information about the Libc-alpha
mailing list