Skip to content

Commit

Permalink
sched: optimize sched_clock() a bit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed Nov 8, 2008
1 parent 0d12cdd commit 7cbaef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7cbaef9

Please sign in to comment.