sched: optimize sched_clock() a bit
authorIngo Molnar <mingo@elte.hu>
Sat, 8 Nov 2008 16:05:38 +0000 (17:05 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 8 Nov 2008 16:05:38 +0000 (17:05 +0100)
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 <mingo@elte.hu>
arch/x86/kernel/tsc.c

index 2ef80e30192571a633f8fb3fb858c20207b9d4d7..424093b157d363dcad0bb58b8ed08636a9e0b61e 100644 (file)
@@ -55,7 +55,7 @@ u64 native_sched_clock(void)
        rdtscll(this_offset);
 
        /* return the value in ns */
        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
 }
 
 /* We need to define a real function for sched_clock, to override the