This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 2/2] Add VDSO version of sched_getcpu on powerpc
- From: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>
- To: Anton Blanchard <anton at samba dot org>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 7 Jan 2013 15:23:25 -0600
- Subject: Re: [PATCH 2/2] Add VDSO version of sched_getcpu on powerpc
- References: <20120709112735.22c2e72b@kryten><20120709112854.72124f0f@kryten>
On Sun, Jul 8, 2012 at 8:28 PM, Anton Blanchard <firstname.lastname@example.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 <email@example.com>
> * 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.