aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMandeep Singh Baines <msb@chromium.org>2011-05-23 01:10:22 -0400
committerIngo Molnar <mingo@elte.hu>2011-05-23 05:58:59 -0400
commit586692a5a5fc5740c8a46abc0f2365495c2d7c5f (patch)
treebc08228e67a968d83691c9efc5ea1feda9e6f98b /include
parente04ab2bc41b35c0cb6cdb07c8443f91aa738cf78 (diff)
watchdog: Disable watchdog when thresh is zero
This restores the previous behavior of softlock_thresh. Currently, setting watchdog_thresh to zero causes the watchdog kthreads to consume a lot of CPU. In addition, the logic of proc_dowatchdog_thresh and proc_dowatchdog_enabled has been factored into proc_dowatchdog. Signed-off-by: Mandeep Singh Baines <msb@chromium.org> Cc: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/1306127423-3347-3-git-send-email-msb@chromium.org Signed-off-by: Ingo Molnar <mingo@elte.hu> LKML-Reference: <20110517071018.GE22305@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nmi.h5
-rw-r--r--include/linux/sched.h1
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index c536f8545f74..5317b8b2198f 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -47,9 +47,10 @@ static inline bool trigger_all_cpu_backtrace(void)
47int hw_nmi_is_cpu_stuck(struct pt_regs *); 47int hw_nmi_is_cpu_stuck(struct pt_regs *);
48u64 hw_nmi_get_sample_period(void); 48u64 hw_nmi_get_sample_period(void);
49extern int watchdog_enabled; 49extern int watchdog_enabled;
50extern int watchdog_thresh;
50struct ctl_table; 51struct ctl_table;
51extern int proc_dowatchdog_enabled(struct ctl_table *, int , 52extern int proc_dowatchdog(struct ctl_table *, int ,
52 void __user *, size_t *, loff_t *); 53 void __user *, size_t *, loff_t *);
53#endif 54#endif
54 55
55#endif 56#endif
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 12211e1666e2..d8b2d0bec0d8 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -315,7 +315,6 @@ extern int proc_dowatchdog_thresh(struct ctl_table *table, int write,
315 void __user *buffer, 315 void __user *buffer,
316 size_t *lenp, loff_t *ppos); 316 size_t *lenp, loff_t *ppos);
317extern unsigned int softlockup_panic; 317extern unsigned int softlockup_panic;
318extern int softlockup_thresh;
319void lockup_detector_init(void); 318void lockup_detector_init(void);
320#else 319#else
321static inline void touch_softlockup_watchdog(void) 320static inline void touch_softlockup_watchdog(void)