提交 7cbaef9c 编写于 作者: I Ingo Molnar

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: NIngo Molnar <mingo@elte.hu>
上级 0d12cdd5
...@@ -55,7 +55,7 @@ u64 native_sched_clock(void) ...@@ -55,7 +55,7 @@ u64 native_sched_clock(void)
rdtscll(this_offset); rdtscll(this_offset);
/* return the value in ns */ /* 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册