diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index b125e3387568..4286b62b34a0 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -101,6 +101,7 @@ static int __maybe_unused one = 1; | |||
101 | static int __maybe_unused two = 2; | 101 | static int __maybe_unused two = 2; |
102 | static unsigned long one_ul = 1; | 102 | static unsigned long one_ul = 1; |
103 | static int one_hundred = 100; | 103 | static int one_hundred = 100; |
104 | static int one_thousand = 1000; | ||
104 | 105 | ||
105 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ | 106 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ |
106 | static int maxolduid = 65535; | 107 | static int maxolduid = 65535; |
@@ -813,6 +814,19 @@ static struct ctl_table kern_table[] = { | |||
813 | .extra1 = &neg_one, | 814 | .extra1 = &neg_one, |
814 | .extra2 = &sixty, | 815 | .extra2 = &sixty, |
815 | }, | 816 | }, |
817 | #endif | ||
818 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
819 | { | ||
820 | .ctl_name = CTL_UNNUMBERED, | ||
821 | .procname = "hung_task_panic", | ||
822 | .data = &sysctl_hung_task_panic, | ||
823 | .maxlen = sizeof(int), | ||
824 | .mode = 0644, | ||
825 | .proc_handler = &proc_dointvec_minmax, | ||
826 | .strategy = &sysctl_intvec, | ||
827 | .extra1 = &zero, | ||
828 | .extra2 = &one, | ||
829 | }, | ||
816 | { | 830 | { |
817 | .ctl_name = CTL_UNNUMBERED, | 831 | .ctl_name = CTL_UNNUMBERED, |
818 | .procname = "hung_task_check_count", | 832 | .procname = "hung_task_check_count", |
@@ -828,7 +842,7 @@ static struct ctl_table kern_table[] = { | |||
828 | .data = &sysctl_hung_task_timeout_secs, | 842 | .data = &sysctl_hung_task_timeout_secs, |
829 | .maxlen = sizeof(unsigned long), | 843 | .maxlen = sizeof(unsigned long), |
830 | .mode = 0644, | 844 | .mode = 0644, |
831 | .proc_handler = &proc_doulongvec_minmax, | 845 | .proc_handler = &proc_dohung_task_timeout_secs, |
832 | .strategy = &sysctl_intvec, | 846 | .strategy = &sysctl_intvec, |
833 | }, | 847 | }, |
834 | { | 848 | { |
@@ -1027,6 +1041,28 @@ static struct ctl_table vm_table[] = { | |||
1027 | .proc_handler = &proc_dointvec, | 1041 | .proc_handler = &proc_dointvec, |
1028 | }, | 1042 | }, |
1029 | { | 1043 | { |
1044 | .ctl_name = CTL_UNNUMBERED, | ||
1045 | .procname = "nr_pdflush_threads_min", | ||
1046 | .data = &nr_pdflush_threads_min, | ||
1047 | .maxlen = sizeof nr_pdflush_threads_min, | ||
1048 | .mode = 0644 /* read-write */, | ||
1049 | .proc_handler = &proc_dointvec_minmax, | ||
1050 | .strategy = &sysctl_intvec, | ||
1051 | .extra1 = &one, | ||
1052 | .extra2 = &nr_pdflush_threads_max, | ||
1053 | }, | ||
1054 | { | ||
1055 | .ctl_name = CTL_UNNUMBERED, | ||
1056 | .procname = "nr_pdflush_threads_max", | ||
1057 | .data = &nr_pdflush_threads_max, | ||
1058 | .maxlen = sizeof nr_pdflush_threads_max, | ||
1059 | .mode = 0644 /* read-write */, | ||
1060 | .proc_handler = &proc_dointvec_minmax, | ||
1061 | .strategy = &sysctl_intvec, | ||
1062 | .extra1 = &nr_pdflush_threads_min, | ||
1063 | .extra2 = &one_thousand, | ||
1064 | }, | ||
1065 | { | ||
1030 | .ctl_name = VM_SWAPPINESS, | 1066 | .ctl_name = VM_SWAPPINESS, |
1031 | .procname = "swappiness", | 1067 | .procname = "swappiness", |
1032 | .data = &vm_swappiness, | 1068 | .data = &vm_swappiness, |