[tip:perf/urgent] watchdog: Don't throttle the watchdog

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: tip-bot for Peter Zijlstra
Date: Friday, August 20, 2010 - 7:18 am

Commit-ID:  b847b94fe2caff0f28a99af6353e9a27282e771a
Gitweb:     http://git.kernel.org/tip/b847b94fe2caff0f28a99af6353e9a27282e771a
Author:     Peter Zijlstra <a.p.zijlstra@chello.nl>
AuthorDate: Fri, 20 Aug 2010 11:49:15 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 20 Aug 2010 15:00:06 +0200

watchdog: Don't throttle the watchdog

Stephane reported that when the machine locks up, the regular ticks,
which are responsible to resetting the throttle count, stop too.

Hence the NMI watchdog can end up being throttled before it reports on
the locked up state, and we end up being sad..

Cure this by having the watchdog overflow reset its own throttle count.

Reported-by: Stephane Eranian <eranian@google.com>
Tested-by: Stephane Eranian <eranian@google.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1282215916.1926.4696.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/watchdog.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 613bc1f..0d53c8e 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -206,6 +206,9 @@ void watchdog_overflow_callback(struct perf_event *event, int nmi,
 		 struct perf_sample_data *data,
 		 struct pt_regs *regs)
 {
+	/* Ensure the watchdog never gets throttled */
+	event->hw.interrupts = 0;
+
 	if (__get_cpu_var(watchdog_nmi_touch) == true) {
 		__get_cpu_var(watchdog_nmi_touch) = false;
 		return;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG] perf_events: NMI watchdog event cannot be throttled, Stephane Eranian, (Wed Aug 18, 1:26 pm)
Re: [BUG] perf_events: NMI watchdog event cannot be throttled, Stephane Eranian, (Thu Aug 19, 4:24 am)
Re: [BUG] perf_events: NMI watchdog event cannot be throttled, Stephane Eranian, (Thu Aug 19, 6:01 am)
[tip:perf/urgent] watchdog: Don't throttle the watchdog, tip-bot for Peter Zi ..., (Fri Aug 20, 7:18 am)
[tip:perf/urgent] watchdog: Don't throttle the watchdog, tip-bot for Peter Zi ..., (Mon Aug 23, 1:51 am)