aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorSameer Nanda <snanda@chromium.org>2012-07-30 17:40:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 20:25:13 -0400
commit45226e944ce071d0231949f2fea90969437cd2dc (patch)
tree6f323df1f61d028f77175525ae54948820cd09a1 /include/linux/sched.h
parent190320c3b6640d4104650f55ff69611e050ea06b (diff)
NMI watchdog: fix for lockup detector breakage on resume
On the suspend/resume path the boot CPU does not go though an offline->online transition. This breaks the NMI detector post-resume since it depends on PMU state that is lost when the system gets suspended. Fix this by forcing a CPU offline->online transition for the lockup detector on the boot CPU during resume. To provide more context, we enable NMI watchdog on Chrome OS. We have seen several reports of systems freezing up completely which indicated that the NMI watchdog was not firing for some reason. Debugging further, we found a simple way of repro'ing system freezes -- issuing the command 'tasket 1 sh -c "echo nmilockup > /proc/breakme"' after the system has been suspended/resumed one or more times. With this patch in place, the system freeze result in panics, as expected. These panics provide a nice stack trace for us to debug the actual issue causing the freeze. [akpm@linux-foundation.org: fiddle with code comment] [akpm@linux-foundation.org: make lockup_detector_bootcpu_resume() conditional on CONFIG_SUSPEND] [akpm@linux-foundation.org: fix section errors] Signed-off-by: Sameer Nanda <snanda@chromium.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Don Zickus <dzickus@redhat.com> Cc: Mandeep Singh Baines <msb@chromium.org> Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1e26a5e45aa6..68dcffaa62a0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -334,6 +334,14 @@ static inline void lockup_detector_init(void)
334} 334}
335#endif 335#endif
336 336
337#if defined(CONFIG_LOCKUP_DETECTOR) && defined(CONFIG_SUSPEND)
338void lockup_detector_bootcpu_resume(void);
339#else
340static inline void lockup_detector_bootcpu_resume(void)
341{
342}
343#endif
344
337#ifdef CONFIG_DETECT_HUNG_TASK 345#ifdef CONFIG_DETECT_HUNG_TASK
338extern unsigned int sysctl_hung_task_panic; 346extern unsigned int sysctl_hung_task_panic;
339extern unsigned long sysctl_hung_task_check_count; 347extern unsigned long sysctl_hung_task_check_count;