aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c55
1 files changed, 50 insertions, 5 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 0b627d9c93d8..89d74436318c 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -82,15 +82,14 @@ extern int percpu_pagelist_fraction;
82extern int compat_log; 82extern int compat_log;
83extern int latencytop_enabled; 83extern int latencytop_enabled;
84extern int sysctl_nr_open_min, sysctl_nr_open_max; 84extern int sysctl_nr_open_min, sysctl_nr_open_max;
85#ifndef CONFIG_MMU
86extern int sysctl_nr_trim_pages;
87#endif
85#ifdef CONFIG_RCU_TORTURE_TEST 88#ifdef CONFIG_RCU_TORTURE_TEST
86extern int rcutorture_runnable; 89extern int rcutorture_runnable;
87#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ 90#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
88 91
89/* Constants used for minimum and maximum */ 92/* Constants used for minimum and maximum */
90#if defined(CONFIG_HIGHMEM) || defined(CONFIG_DETECT_SOFTLOCKUP)
91static int one = 1;
92#endif
93
94#ifdef CONFIG_DETECT_SOFTLOCKUP 93#ifdef CONFIG_DETECT_SOFTLOCKUP
95static int sixty = 60; 94static int sixty = 60;
96static int neg_one = -1; 95static int neg_one = -1;
@@ -101,6 +100,7 @@ static int two = 2;
101#endif 100#endif
102 101
103static int zero; 102static int zero;
103static int one = 1;
104static int one_hundred = 100; 104static int one_hundred = 100;
105 105
106/* 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 */
@@ -121,6 +121,10 @@ extern int sg_big_buff;
121#include <asm/system.h> 121#include <asm/system.h>
122#endif 122#endif
123 123
124#ifdef CONFIG_SPARC64
125extern int sysctl_tsb_ratio;
126#endif
127
124#ifdef __hppa__ 128#ifdef __hppa__
125extern int pwrsw_enabled; 129extern int pwrsw_enabled;
126extern int unaligned_enabled; 130extern int unaligned_enabled;
@@ -451,6 +455,16 @@ static struct ctl_table kern_table[] = {
451 .proc_handler = &proc_dointvec, 455 .proc_handler = &proc_dointvec,
452 }, 456 },
453#endif 457#endif
458#ifdef CONFIG_SPARC64
459 {
460 .ctl_name = CTL_UNNUMBERED,
461 .procname = "tsb-ratio",
462 .data = &sysctl_tsb_ratio,
463 .maxlen = sizeof (int),
464 .mode = 0644,
465 .proc_handler = &proc_dointvec,
466 },
467#endif
454#ifdef __hppa__ 468#ifdef __hppa__
455 { 469 {
456 .ctl_name = KERN_HPPA_PWRSW, 470 .ctl_name = KERN_HPPA_PWRSW,
@@ -938,12 +952,22 @@ static struct ctl_table vm_table[] = {
938 .data = &dirty_background_ratio, 952 .data = &dirty_background_ratio,
939 .maxlen = sizeof(dirty_background_ratio), 953 .maxlen = sizeof(dirty_background_ratio),
940 .mode = 0644, 954 .mode = 0644,
941 .proc_handler = &proc_dointvec_minmax, 955 .proc_handler = &dirty_background_ratio_handler,
942 .strategy = &sysctl_intvec, 956 .strategy = &sysctl_intvec,
943 .extra1 = &zero, 957 .extra1 = &zero,
944 .extra2 = &one_hundred, 958 .extra2 = &one_hundred,
945 }, 959 },
946 { 960 {
961 .ctl_name = CTL_UNNUMBERED,
962 .procname = "dirty_background_bytes",
963 .data = &dirty_background_bytes,
964 .maxlen = sizeof(dirty_background_bytes),
965 .mode = 0644,
966 .proc_handler = &dirty_background_bytes_handler,
967 .strategy = &sysctl_intvec,
968 .extra1 = &one,
969 },
970 {
947 .ctl_name = VM_DIRTY_RATIO, 971 .ctl_name = VM_DIRTY_RATIO,
948 .procname = "dirty_ratio", 972 .procname = "dirty_ratio",
949 .data = &vm_dirty_ratio, 973 .data = &vm_dirty_ratio,
@@ -955,6 +979,16 @@ static struct ctl_table vm_table[] = {
955 .extra2 = &one_hundred, 979 .extra2 = &one_hundred,
956 }, 980 },
957 { 981 {
982 .ctl_name = CTL_UNNUMBERED,
983 .procname = "dirty_bytes",
984 .data = &vm_dirty_bytes,
985 .maxlen = sizeof(vm_dirty_bytes),
986 .mode = 0644,
987 .proc_handler = &dirty_bytes_handler,
988 .strategy = &sysctl_intvec,
989 .extra1 = &one,
990 },
991 {
958 .procname = "dirty_writeback_centisecs", 992 .procname = "dirty_writeback_centisecs",
959 .data = &dirty_writeback_interval, 993 .data = &dirty_writeback_interval,
960 .maxlen = sizeof(dirty_writeback_interval), 994 .maxlen = sizeof(dirty_writeback_interval),
@@ -1071,6 +1105,17 @@ static struct ctl_table vm_table[] = {
1071 .mode = 0644, 1105 .mode = 0644,
1072 .proc_handler = &proc_dointvec 1106 .proc_handler = &proc_dointvec
1073 }, 1107 },
1108#else
1109 {
1110 .ctl_name = CTL_UNNUMBERED,
1111 .procname = "nr_trim_pages",
1112 .data = &sysctl_nr_trim_pages,
1113 .maxlen = sizeof(sysctl_nr_trim_pages),
1114 .mode = 0644,
1115 .proc_handler = &proc_dointvec_minmax,
1116 .strategy = &sysctl_intvec,
1117 .extra1 = &zero,
1118 },
1074#endif 1119#endif
1075 { 1120 {
1076 .ctl_name = VM_LAPTOP_MODE, 1121 .ctl_name = VM_LAPTOP_MODE,