aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index b859e6b5a767..35a50db9b6ce 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -43,6 +43,7 @@
43#include <linux/limits.h> 43#include <linux/limits.h>
44#include <linux/dcache.h> 44#include <linux/dcache.h>
45#include <linux/syscalls.h> 45#include <linux/syscalls.h>
46#include <linux/vmstat.h>
46#include <linux/nfs_fs.h> 47#include <linux/nfs_fs.h>
47#include <linux/acpi.h> 48#include <linux/acpi.h>
48#include <linux/reboot.h> 49#include <linux/reboot.h>
@@ -80,7 +81,6 @@ extern int sysctl_drop_caches;
80extern int percpu_pagelist_fraction; 81extern int percpu_pagelist_fraction;
81extern int compat_log; 82extern int compat_log;
82extern int maps_protect; 83extern int maps_protect;
83extern int sysctl_stat_interval;
84extern int latencytop_enabled; 84extern int latencytop_enabled;
85extern int sysctl_nr_open_min, sysctl_nr_open_max; 85extern int sysctl_nr_open_min, sysctl_nr_open_max;
86#ifdef CONFIG_RCU_TORTURE_TEST 86#ifdef CONFIG_RCU_TORTURE_TEST
@@ -88,12 +88,13 @@ extern int rcutorture_runnable;
88#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ 88#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
89 89
90/* Constants used for minimum and maximum */ 90/* Constants used for minimum and maximum */
91#if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM) 91#if defined(CONFIG_HIGHMEM) || defined(CONFIG_DETECT_SOFTLOCKUP)
92static int one = 1; 92static int one = 1;
93#endif 93#endif
94 94
95#ifdef CONFIG_DETECT_SOFTLOCKUP 95#ifdef CONFIG_DETECT_SOFTLOCKUP
96static int sixty = 60; 96static int sixty = 60;
97static int neg_one = -1;
97#endif 98#endif
98 99
99#ifdef CONFIG_MMU 100#ifdef CONFIG_MMU
@@ -623,7 +624,7 @@ static struct ctl_table kern_table[] = {
623 { 624 {
624 .ctl_name = KERN_PRINTK_RATELIMIT, 625 .ctl_name = KERN_PRINTK_RATELIMIT,
625 .procname = "printk_ratelimit", 626 .procname = "printk_ratelimit",
626 .data = &printk_ratelimit_jiffies, 627 .data = &printk_ratelimit_state.interval,
627 .maxlen = sizeof(int), 628 .maxlen = sizeof(int),
628 .mode = 0644, 629 .mode = 0644,
629 .proc_handler = &proc_dointvec_jiffies, 630 .proc_handler = &proc_dointvec_jiffies,
@@ -632,7 +633,7 @@ static struct ctl_table kern_table[] = {
632 { 633 {
633 .ctl_name = KERN_PRINTK_RATELIMIT_BURST, 634 .ctl_name = KERN_PRINTK_RATELIMIT_BURST,
634 .procname = "printk_ratelimit_burst", 635 .procname = "printk_ratelimit_burst",
635 .data = &printk_ratelimit_burst, 636 .data = &printk_ratelimit_state.burst,
636 .maxlen = sizeof(int), 637 .maxlen = sizeof(int),
637 .mode = 0644, 638 .mode = 0644,
638 .proc_handler = &proc_dointvec, 639 .proc_handler = &proc_dointvec,
@@ -739,13 +740,24 @@ static struct ctl_table kern_table[] = {
739#ifdef CONFIG_DETECT_SOFTLOCKUP 740#ifdef CONFIG_DETECT_SOFTLOCKUP
740 { 741 {
741 .ctl_name = CTL_UNNUMBERED, 742 .ctl_name = CTL_UNNUMBERED,
743 .procname = "softlockup_panic",
744 .data = &softlockup_panic,
745 .maxlen = sizeof(int),
746 .mode = 0644,
747 .proc_handler = &proc_dointvec_minmax,
748 .strategy = &sysctl_intvec,
749 .extra1 = &zero,
750 .extra2 = &one,
751 },
752 {
753 .ctl_name = CTL_UNNUMBERED,
742 .procname = "softlockup_thresh", 754 .procname = "softlockup_thresh",
743 .data = &softlockup_thresh, 755 .data = &softlockup_thresh,
744 .maxlen = sizeof(unsigned long), 756 .maxlen = sizeof(int),
745 .mode = 0644, 757 .mode = 0644,
746 .proc_handler = &proc_doulongvec_minmax, 758 .proc_handler = &proc_dointvec_minmax,
747 .strategy = &sysctl_intvec, 759 .strategy = &sysctl_intvec,
748 .extra1 = &one, 760 .extra1 = &neg_one,
749 .extra2 = &sixty, 761 .extra2 = &sixty,
750 }, 762 },
751 { 763 {
@@ -947,7 +959,7 @@ static struct ctl_table vm_table[] = {
947#ifdef CONFIG_HUGETLB_PAGE 959#ifdef CONFIG_HUGETLB_PAGE
948 { 960 {
949 .procname = "nr_hugepages", 961 .procname = "nr_hugepages",
950 .data = &max_huge_pages, 962 .data = NULL,
951 .maxlen = sizeof(unsigned long), 963 .maxlen = sizeof(unsigned long),
952 .mode = 0644, 964 .mode = 0644,
953 .proc_handler = &hugetlb_sysctl_handler, 965 .proc_handler = &hugetlb_sysctl_handler,
@@ -973,10 +985,12 @@ static struct ctl_table vm_table[] = {
973 { 985 {
974 .ctl_name = CTL_UNNUMBERED, 986 .ctl_name = CTL_UNNUMBERED,
975 .procname = "nr_overcommit_hugepages", 987 .procname = "nr_overcommit_hugepages",
976 .data = &sysctl_overcommit_huge_pages, 988 .data = NULL,
977 .maxlen = sizeof(sysctl_overcommit_huge_pages), 989 .maxlen = sizeof(unsigned long),
978 .mode = 0644, 990 .mode = 0644,
979 .proc_handler = &hugetlb_overcommit_handler, 991 .proc_handler = &hugetlb_overcommit_handler,
992 .extra1 = (void *)&hugetlb_zero,
993 .extra2 = (void *)&hugetlb_infinity,
980 }, 994 },
981#endif 995#endif
982 { 996 {