mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
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>
This commit is contained in:
parent
0d12cdd5f8
commit
7cbaef9c83
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue