[PATCH 2/2] Add VDSO version of sched_getcpu on powerpc
Carlos O'Donell
carlos@systemhalted.org
Mon Jan 7 21:53:00 GMT 2013
On 01/07/2013 04:23 PM, Ryan S. Arnold wrote:
> 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).
Ensuring you have the feature available is an important
part of the patch :-)
If the minimum kernel version is new enough that you
are guaranteed to have the feature then you don't
need to use an __ASSUME_* macro.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list