[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <482AC3E4.2050200@firstfloor.org>
Date: Wed, 14 May 2008 12:50:12 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Jeremy Fitzhardinge <jeremy@...p.org>
CC: Andrew Morton <akpm@...ux-foundation.org>,
Segher Boessenkool <segher@...nel.crashing.org>,
Robert Hancock <hancockr@...w.ca>,
Christian Kujau <lists@...dbynature.de>,
LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
john stultz <johnstul@...ibm.com>
Subject: Re: [PATCH] common implementation of iterative div/mod
Jeremy Fitzhardinge wrote:
> Andi Kleen wrote:
>> You would need to annotate it and have a separate object file for the
>> different sections. Also it would need to be compiled PIC.
>>
>> Inlining is better.
>
> BTW, I'm seeing the memcpy() in __vdso_gettimeofday() not being inlined.
Hmm works here. What compiler do you use? Normally gcc should
recognize the memcpy is just two constant stores and always inline even with -Os.
nm --dynamic arch/x86/vdso/vdso.so
0000000000000000 A LINUX_2.6
ffffffffff7007e0 T __vdso_clock_gettime
ffffffffff700820 T __vdso_getcpu
ffffffffff700750 T __vdso_gettimeofday
ffffffffff7007e0 W clock_gettime
ffffffffff700820 W getcpu
ffffffffff700750 W gettimeofday
Anyways if your compiler or config cannot get that right it would need
to switch to __inline_memcpy(), but that would be slower or explicit
copying field by field.
If it's a common problem we could also implement a build time check,
but normally such problems should be already caught in code review.
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists