summaryrefslogtreecommitdiffstats
path: root/kernel/hung_task.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-10-19 18:18:28 +0200
committerIngo Molnar <mingo@kernel.org>2013-10-31 11:16:18 +0100
commit6a716c90a51338009c3bc1f460829afaed8f922d (patch)
tree85e821a30e0f9350a2b67ff94d758632eec92689 /kernel/hung_task.c
parent4c4e4f61368164f326fe59e2156c70d7faa72c17 (diff)
downloadlinux-stable-6a716c90a51338009c3bc1f460829afaed8f922d.tar.gz
linux-stable-6a716c90a51338009c3bc1f460829afaed8f922d.tar.bz2
linux-stable-6a716c90a51338009c3bc1f460829afaed8f922d.zip
hung_task debugging: Add tracepoint to report the hang
Currently check_hung_task() prints a warning if it detects the problem, but it is not convenient to watch the system logs if user-space wants to be notified about the hang. Add the new trace_sched_process_hang() into check_hung_task(), this way a user-space monitor can easily wait for the hang and potentially resolve a problem. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Dave Sullivan <dsulliva@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/20131019161828.GA7439@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/hung_task.c')
-rw-r--r--kernel/hung_task.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 042252383fd2..8807061ca004 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -16,6 +16,7 @@
#include <linux/export.h>
#include <linux/sysctl.h>
#include <linux/utsname.h>
+#include <trace/events/sched.h>
/*
* The number of tasks checked:
@@ -92,6 +93,9 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
t->last_switch_count = switch_count;
return;
}
+
+ trace_sched_process_hang(t);
+
if (!sysctl_hung_task_warnings)
return;
sysctl_hung_task_warnings--;