PowerPC: gettimeofday optimization by using IFUNC

Mike Frysinger vapier@gentoo.org
Sun Mar 3 05:18:00 GMT 2013


On Friday 22 February 2013 15:28:21 Adhemerval Zanella wrote:
> On 02/22/2013 05:18 PM, Andi Kleen wrote:
> > Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:
> >> Hi,
> >> 
> >> This patch make gettimeofday uses IFUNC and optimizing its call by avoid
> >> the unnecessary way through glibc's internal __gettimeofday. Any tips,
> >> advices, comments?
> > 
> > Very nice optimizations. The extra round trip always annoyed me.  And
> > using IFUNC for it is a nice trick.  Is it possible to do on x86 too?
> 
> The x86_64 code already has the optimization, but afaik x86 does not
> provide a vdso (well, at least I couldn't see any on a 3.2 kernel, correct
> me if I'm wrong).

iirc, the opinion is that if you're running a 32bit kernel, you're not serious 
about optimizations, and x86_64 is dirt cheap.

there is a vdso for 32bit apps (not sure if it's only for x86_64 kernels), but 
the only thing in it is the syscall helper.  see arch/x86/vdso/vdso32/*.S.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130303/0fda8f71/attachment.sig>


More information about the Libc-alpha mailing list