x86: improve default idle
authorIngo Molnar <mingo@elte.hu>
Wed, 2 Apr 2008 11:23:22 +0000 (13:23 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:34 +0000 (17:41 +0200)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c

index 08c41ed..3903a8f 100644 (file)
@@ -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;
index 4f40272..e75ccc8 100644 (file)
@@ -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;