mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
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>
This commit is contained in:
committed by
Ingo Molnar
parent
4c4e4f6136
commit
6a716c90a5
@@ -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--;
|
||||
|
Reference in New Issue
Block a user