Skip to content
Snippets Groups Projects
Commit 625056b6 authored by Sasha Levin's avatar Sasha Levin Committed by Ingo Molnar
Browse files

hung task debugging: Inject NMI when hung and going to panic


Send an NMI to all CPUs when a hung task is detected and the hung
task code is configured to panic. This gives us a fairly uptodate
snapshot of all CPUs in the system.

This lets us get stack trace of all CPUs which makes life easier
trying to debug a deadlock, and the NMI doesn't change anything
since the next step is a kernel panic.

Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1331848040-1676-1-git-send-email-levinsasha928@gmail.com


[ extended the changelog a bit ]
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent af3a3ab2
No related branches found
No related tags found
No related merge requests found
...@@ -108,8 +108,10 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) ...@@ -108,8 +108,10 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
touch_nmi_watchdog(); touch_nmi_watchdog();
if (sysctl_hung_task_panic) if (sysctl_hung_task_panic) {
trigger_all_cpu_backtrace();
panic("hung_task: blocked tasks"); panic("hung_task: blocked tasks");
}
} }
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment