This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] Add VDSO version of sched_getcpu on powerpc
- From: Carlos O'Donell <carlos at systemhalted dot org>
- To: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>
- Cc: Anton Blanchard <anton at samba dot org>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 07 Jan 2013 16:53:03 -0500
- Subject: Re: [PATCH 2/2] Add VDSO version of sched_getcpu on powerpc
- References: <20120709112735.22c2e72b@kryten> <20120709112854.72124f0f@kryten> <CAAKybw_s+CB050_ACm1dB=nS1fW1C+YHcrupopH5N25D7Ew0qw@mail.gmail.com>
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.