[PATCH 03/32 RESEND] nohz: Drop useless ts->inidle check before rearming the tick

Frederic Weisbecker
2011-08-15T15:52:54Z

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@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Paul E . McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tim Pepper <lnxninja@linux.vnet.ibm.com>
---
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