Skip to content

Commit

Permalink
x86: improve default idle
Browse files Browse the repository at this point in the history
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Apr 17, 2008
1 parent f5149a4 commit 13af483
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
8 changes: 0 additions & 8 deletions arch/x86/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 13af483

Please sign in to comment.