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: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7cbaef9c83e58bbd4bdd534b09052b6c5ec457d5;p=linux-2.6-omap-h63xx.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 2ef80e30192..424093b157d 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