From: Ingo Molnar Date: Sat, 8 Nov 2008 16:05:38 +0000 (+0100) Subject: sched: optimize sched_clock() a bit X-Git-Tag: v2.6.28-rc4~10^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7cbaef9c;p=karo-tx-linux.git sched: optimize sched_clock() a bit sched_clock() uses cycles_2_ns() needlessly - which is an irq-disabling variant of __cycles_2_ns(). Most of the time sched_clock() is called with irqs disabled already. The few places that call it with irqs enabled need to be updated. Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 2ef80e301925..424093b157d3 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -55,7 +55,7 @@ u64 native_sched_clock(void) rdtscll(this_offset); /* return the value in ns */ - return cycles_2_ns(this_offset); + return __cycles_2_ns(this_offset); } /* We need to define a real function for sched_clock, to override the