aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-05-12 09:43:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-05-30 08:15:02 -0400
commit02ff375590ac4140d88afc76505df1ad45c6af59 (patch)
tree6c24cfb6d0e652f691325dc63afab1373b808442 /kernel
parent1c4cd6dd1d0fd3057bb6b8c87460049497889d1b (diff)
softlockup: fix false positives on nohz if CPU is 100% idle for more than 60 seconds
Fix (probably theoretical only) rq->clock update bug: in tick_nohz_update_jiffies() [which is called on all irq entry on all cpus where the irq entry hits an idle cpu] we call touch_softlockup_watchdog() before we update jiffies. That works fine most of the time when idle timeouts are within 60 seconds. But when an idle timeout is beyond 60 seconds, jiffies is updated with a jump of more than 60 seconds, which causes a jump in cpu-clock of more than 60 seconds, triggering a false positive. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/tick-sched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index b854a895591e..28abad66fc8e 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -133,8 +133,6 @@ void tick_nohz_update_jiffies(void)
133 if (!ts->tick_stopped) 133 if (!ts->tick_stopped)
134 return; 134 return;
135 135
136 touch_softlockup_watchdog();
137
138 cpu_clear(cpu, nohz_cpu_mask); 136 cpu_clear(cpu, nohz_cpu_mask);
139 now = ktime_get(); 137 now = ktime_get();
140 ts->idle_waketime = now; 138 ts->idle_waketime = now;
@@ -142,6 +140,8 @@ void tick_nohz_update_jiffies(void)
142 local_irq_save(flags); 140 local_irq_save(flags);
143 tick_do_update_jiffies64(now); 141 tick_do_update_jiffies64(now);
144 local_irq_restore(flags); 142 local_irq_restore(flags);
143
144 touch_softlockup_watchdog();
145} 145}
146 146
147void tick_nohz_stop_idle(int cpu) 147void tick_nohz_stop_idle(int cpu)