浏览代码

softlockup: fix watchdog task wakeup frequency

Updating the timestamp more often is pointless as we print the warnings
only if we exceed the threshold.  And the check for hung tasks relies on
the last timestamp, so it will keep working correctly, too.

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Johannes Weiner 17 年之前
父节点
当前提交
dd7a1e5615
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      kernel/softlockup.c

+ 5 - 2
kernel/softlockup.c

@@ -130,8 +130,11 @@ void softlockup_tick(void)
 
 
 	now = get_timestamp(this_cpu);
 	now = get_timestamp(this_cpu);
 
 
-	/* Wake up the high-prio watchdog task every second: */
-	if (now > (touch_timestamp + 1))
+	/*
+	 * Wake up the high-prio watchdog task twice per
+	 * threshold timespan.
+	 */
+	if (now > touch_timestamp + softlockup_thresh/2)
 		wake_up_process(per_cpu(watchdog_task, this_cpu));
 		wake_up_process(per_cpu(watchdog_task, this_cpu));
 
 
 	/* Warn about unreasonable delays: */
 	/* Warn about unreasonable delays: */