tick: Conditionally build nohz specific code in tick handler
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 15 Oct 2012 14:17:16 +0000 (16:17 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Mon, 15 Oct 2012 16:51:08 +0000 (18:51 +0200)
This optimize a bit the high res tick sched handler.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
kernel/time/tick-sched.c

index 68a873af09a851580943ba6992173af1e144f54a..766d4c47a4a494b16d45c8f689798fc758be6818 100644 (file)
@@ -122,6 +122,7 @@ static void tick_sched_do_timer(ktime_t now)
 
 static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs)
 {
+#ifdef CONFIG_NO_HZ
        /*
         * When we are idle and the tick is stopped, we have to touch
         * the watchdog as we might not schedule for a really long
@@ -135,6 +136,7 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs)
                if (is_idle_task(current))
                        ts->idle_jiffies++;
        }
+#endif
        update_process_times(user_mode(regs));
        profile_tick(CPU_PROFILING);
 }