diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 56 |
1 files changed, 22 insertions, 34 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 4286b62b34a0..6a463716ecbf 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -101,7 +101,9 @@ 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 | /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ | ||
106 | static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; | ||
105 | 107 | ||
106 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ | 108 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ |
107 | static int maxolduid = 65535; | 109 | static int maxolduid = 65535; |
@@ -729,6 +731,14 @@ static struct ctl_table kern_table[] = { | |||
729 | }, | 731 | }, |
730 | { | 732 | { |
731 | .ctl_name = CTL_UNNUMBERED, | 733 | .ctl_name = CTL_UNNUMBERED, |
734 | .procname = "bootloader_version", | ||
735 | .data = &bootloader_version, | ||
736 | .maxlen = sizeof (int), | ||
737 | .mode = 0444, | ||
738 | .proc_handler = &proc_dointvec, | ||
739 | }, | ||
740 | { | ||
741 | .ctl_name = CTL_UNNUMBERED, | ||
732 | .procname = "kstack_depth_to_print", | 742 | .procname = "kstack_depth_to_print", |
733 | .data = &kstack_depth_to_print, | 743 | .data = &kstack_depth_to_print, |
734 | .maxlen = sizeof(int), | 744 | .maxlen = sizeof(int), |
@@ -902,16 +912,6 @@ static struct ctl_table kern_table[] = { | |||
902 | .proc_handler = &proc_dointvec, | 912 | .proc_handler = &proc_dointvec, |
903 | }, | 913 | }, |
904 | #endif | 914 | #endif |
905 | #ifdef CONFIG_UNEVICTABLE_LRU | ||
906 | { | ||
907 | .ctl_name = CTL_UNNUMBERED, | ||
908 | .procname = "scan_unevictable_pages", | ||
909 | .data = &scan_unevictable_pages, | ||
910 | .maxlen = sizeof(scan_unevictable_pages), | ||
911 | .mode = 0644, | ||
912 | .proc_handler = &scan_unevictable_handler, | ||
913 | }, | ||
914 | #endif | ||
915 | #ifdef CONFIG_SLOW_WORK | 915 | #ifdef CONFIG_SLOW_WORK |
916 | { | 916 | { |
917 | .ctl_name = CTL_UNNUMBERED, | 917 | .ctl_name = CTL_UNNUMBERED, |
@@ -1016,7 +1016,7 @@ static struct ctl_table vm_table[] = { | |||
1016 | .mode = 0644, | 1016 | .mode = 0644, |
1017 | .proc_handler = &dirty_bytes_handler, | 1017 | .proc_handler = &dirty_bytes_handler, |
1018 | .strategy = &sysctl_intvec, | 1018 | .strategy = &sysctl_intvec, |
1019 | .extra1 = &one_ul, | 1019 | .extra1 = &dirty_bytes_min, |
1020 | }, | 1020 | }, |
1021 | { | 1021 | { |
1022 | .procname = "dirty_writeback_centisecs", | 1022 | .procname = "dirty_writeback_centisecs", |
@@ -1041,28 +1041,6 @@ static struct ctl_table vm_table[] = { | |||
1041 | .proc_handler = &proc_dointvec, | 1041 | .proc_handler = &proc_dointvec, |
1042 | }, | 1042 | }, |
1043 | { | 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 | { | ||
1066 | .ctl_name = VM_SWAPPINESS, | 1044 | .ctl_name = VM_SWAPPINESS, |
1067 | .procname = "swappiness", | 1045 | .procname = "swappiness", |
1068 | .data = &vm_swappiness, | 1046 | .data = &vm_swappiness, |
@@ -1302,6 +1280,16 @@ static struct ctl_table vm_table[] = { | |||
1302 | .extra2 = &one, | 1280 | .extra2 = &one, |
1303 | }, | 1281 | }, |
1304 | #endif | 1282 | #endif |
1283 | #ifdef CONFIG_UNEVICTABLE_LRU | ||
1284 | { | ||
1285 | .ctl_name = CTL_UNNUMBERED, | ||
1286 | .procname = "scan_unevictable_pages", | ||
1287 | .data = &scan_unevictable_pages, | ||
1288 | .maxlen = sizeof(scan_unevictable_pages), | ||
1289 | .mode = 0644, | ||
1290 | .proc_handler = &scan_unevictable_handler, | ||
1291 | }, | ||
1292 | #endif | ||
1305 | /* | 1293 | /* |
1306 | * NOTE: do not add new entries to this table unless you have read | 1294 | * NOTE: do not add new entries to this table unless you have read |
1307 | * Documentation/sysctl/ctl_unnumbered.txt | 1295 | * Documentation/sysctl/ctl_unnumbered.txt |