Commit 13af4836 authored by Ingo Molnar's avatar Ingo Molnar

x86: improve default idle

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f5149a49
......@@ -113,16 +113,8 @@ void default_idle(void)
local_irq_disable();
if (!need_resched()) {
ktime_t t0, t1;
u64 t0n, t1n;
t0 = ktime_get();
t0n = ktime_to_ns(t0);
safe_halt(); /* enables interrupts racelessly */
local_irq_disable();
t1 = ktime_get();
t1n = ktime_to_ns(t1);
sched_clock_idle_wakeup_event(t1n - t0n);
}
local_irq_enable();
current_thread_info()->status |= TS_POLLING;
......
......@@ -107,16 +107,8 @@ void default_idle(void)
smp_mb();
local_irq_disable();
if (!need_resched()) {
ktime_t t0, t1;
u64 t0n, t1n;
t0 = ktime_get();
t0n = ktime_to_ns(t0);
safe_halt(); /* enables interrupts racelessly */
local_irq_disable();
t1 = ktime_get();
t1n = ktime_to_ns(t1);
sched_clock_idle_wakeup_event(t1n - t0n);
}
local_irq_enable();
current_thread_info()->status |= TS_POLLING;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment