aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
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 /kernel/sysctl.c
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 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c0bb32414b17..3dd0c46fa3bb 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -730,14 +730,16 @@ static struct ctl_table kern_table[] = {
730 .data = &watchdog_enabled, 730 .data = &watchdog_enabled,
731 .maxlen = sizeof (int), 731 .maxlen = sizeof (int),
732 .mode = 0644, 732 .mode = 0644,
733 .proc_handler = proc_dowatchdog_enabled, 733 .proc_handler = proc_dowatchdog,
734 .extra1 = &zero,
735 .extra2 = &one,
734 }, 736 },
735 { 737 {
736 .procname = "watchdog_thresh", 738 .procname = "watchdog_thresh",
737 .data = &softlockup_thresh, 739 .data = &watchdog_thresh,
738 .maxlen = sizeof(int), 740 .maxlen = sizeof(int),
739 .mode = 0644, 741 .mode = 0644,
740 .proc_handler = proc_dowatchdog_thresh, 742 .proc_handler = proc_dowatchdog,
741 .extra1 = &neg_one, 743 .extra1 = &neg_one,
742 .extra2 = &sixty, 744 .extra2 = &sixty,
743 }, 745 },
@@ -755,7 +757,9 @@ static struct ctl_table kern_table[] = {
755 .data = &watchdog_enabled, 757 .data = &watchdog_enabled,
756 .maxlen = sizeof (int), 758 .maxlen = sizeof (int),
757 .mode = 0644, 759 .mode = 0644,
758 .proc_handler = proc_dowatchdog_enabled, 760 .proc_handler = proc_dowatchdog,
761 .extra1 = &zero,
762 .extra2 = &one,
759 }, 763 },
760#endif 764#endif
761#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) 765#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)