diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-08 11:05:38 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-08 11:05:38 -0500 |
commit | 7cbaef9c83e58bbd4bdd534b09052b6c5ec457d5 (patch) | |
tree | 7d2746038b50eb3b2721f506f82de9a0a910c2e6 /arch | |
parent | 0d12cdd5f883f508d33b85c1bae98fa28987c8c7 (diff) |
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 <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/tsc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
55 | rdtscll(this_offset); | 55 | rdtscll(this_offset); |
56 | 56 | ||
57 | /* return the value in ns */ | 57 | /* return the value in ns */ |
58 | return cycles_2_ns(this_offset); | 58 | return __cycles_2_ns(this_offset); |
59 | } | 59 | } |
60 | 60 | ||
61 | /* We need to define a real function for sched_clock, to override the | 61 | /* We need to define a real function for sched_clock, to override the |