[PATCH 3/2] nohz: Drop useless ts->inidle check before rearming the tick

From: Frederic Weisbecker
Date: Mon Jul 25 2011 - 17:14:34 EST


We only need to check if we have ts->stopped to ensure the tick
was stopped and we want to re-enable it. Checking ts->inidle
there is useless.

Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
---
kernel/time/tick-sched.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index c4d7113..5934aee 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -504,16 +504,14 @@ void tick_nohz_restart_sched_tick(void)
if (ts->inidle) {
now = ktime_get();
tick_nohz_stop_idle(cpu, now);
+ ts->inidle = 0;
}

- if (!ts->inidle || !ts->tick_stopped) {
- ts->inidle = 0;
+ if (!ts->tick_stopped) {
local_irq_enable();
return;
}

- ts->inidle = 0;
-
rcu_exit_nohz();

/* Update jiffies first */
--
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/