diff options
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 27 | 
1 files changed, 22 insertions, 5 deletions
| diff --git a/kernel/sysctl.c b/kernel/sysctl.c index ff6d45c7626f..92f6e5bc3c24 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
| @@ -87,10 +87,6 @@ extern int rcutorture_runnable; | |||
| 87 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 87 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 
| 88 | 88 | ||
| 89 | /* Constants used for minimum and maximum */ | 89 | /* Constants used for minimum and maximum */ | 
| 90 | #if defined(CONFIG_HIGHMEM) || defined(CONFIG_DETECT_SOFTLOCKUP) | ||
| 91 | static int one = 1; | ||
| 92 | #endif | ||
| 93 | |||
| 94 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 90 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 
| 95 | static int sixty = 60; | 91 | static int sixty = 60; | 
| 96 | static int neg_one = -1; | 92 | static int neg_one = -1; | 
| @@ -101,6 +97,7 @@ static int two = 2; | |||
| 101 | #endif | 97 | #endif | 
| 102 | 98 | ||
| 103 | static int zero; | 99 | static int zero; | 
| 100 | static int one = 1; | ||
| 104 | static int one_hundred = 100; | 101 | static int one_hundred = 100; | 
| 105 | 102 | ||
| 106 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ | 103 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ | 
| @@ -952,12 +949,22 @@ static struct ctl_table vm_table[] = { | |||
| 952 | .data = &dirty_background_ratio, | 949 | .data = &dirty_background_ratio, | 
| 953 | .maxlen = sizeof(dirty_background_ratio), | 950 | .maxlen = sizeof(dirty_background_ratio), | 
| 954 | .mode = 0644, | 951 | .mode = 0644, | 
| 955 | .proc_handler = &proc_dointvec_minmax, | 952 | .proc_handler = &dirty_background_ratio_handler, | 
| 956 | .strategy = &sysctl_intvec, | 953 | .strategy = &sysctl_intvec, | 
| 957 | .extra1 = &zero, | 954 | .extra1 = &zero, | 
| 958 | .extra2 = &one_hundred, | 955 | .extra2 = &one_hundred, | 
| 959 | }, | 956 | }, | 
| 960 | { | 957 | { | 
| 958 | .ctl_name = CTL_UNNUMBERED, | ||
| 959 | .procname = "dirty_background_bytes", | ||
| 960 | .data = &dirty_background_bytes, | ||
| 961 | .maxlen = sizeof(dirty_background_bytes), | ||
| 962 | .mode = 0644, | ||
| 963 | .proc_handler = &dirty_background_bytes_handler, | ||
| 964 | .strategy = &sysctl_intvec, | ||
| 965 | .extra1 = &one, | ||
| 966 | }, | ||
| 967 | { | ||
| 961 | .ctl_name = VM_DIRTY_RATIO, | 968 | .ctl_name = VM_DIRTY_RATIO, | 
| 962 | .procname = "dirty_ratio", | 969 | .procname = "dirty_ratio", | 
| 963 | .data = &vm_dirty_ratio, | 970 | .data = &vm_dirty_ratio, | 
| @@ -969,6 +976,16 @@ static struct ctl_table vm_table[] = { | |||
| 969 | .extra2 = &one_hundred, | 976 | .extra2 = &one_hundred, | 
| 970 | }, | 977 | }, | 
| 971 | { | 978 | { | 
| 979 | .ctl_name = CTL_UNNUMBERED, | ||
| 980 | .procname = "dirty_bytes", | ||
| 981 | .data = &vm_dirty_bytes, | ||
| 982 | .maxlen = sizeof(vm_dirty_bytes), | ||
| 983 | .mode = 0644, | ||
| 984 | .proc_handler = &dirty_bytes_handler, | ||
| 985 | .strategy = &sysctl_intvec, | ||
| 986 | .extra1 = &one, | ||
| 987 | }, | ||
| 988 | { | ||
| 972 | .procname = "dirty_writeback_centisecs", | 989 | .procname = "dirty_writeback_centisecs", | 
| 973 | .data = &dirty_writeback_interval, | 990 | .data = &dirty_writeback_interval, | 
| 974 | .maxlen = sizeof(dirty_writeback_interval), | 991 | .maxlen = sizeof(dirty_writeback_interval), | 
