diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 4c93486b45d1..84ff5e75c084 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/highuid.h> | 37 | #include <linux/highuid.h> |
38 | #include <linux/writeback.h> | 38 | #include <linux/writeback.h> |
39 | #include <linux/ratelimit.h> | 39 | #include <linux/ratelimit.h> |
40 | #include <linux/compaction.h> | ||
40 | #include <linux/hugetlb.h> | 41 | #include <linux/hugetlb.h> |
41 | #include <linux/initrd.h> | 42 | #include <linux/initrd.h> |
42 | #include <linux/key.h> | 43 | #include <linux/key.h> |
@@ -262,6 +263,11 @@ static int min_sched_shares_ratelimit = 100000; /* 100 usec */ | |||
262 | static int max_sched_shares_ratelimit = NSEC_PER_SEC; /* 1 second */ | 263 | static int max_sched_shares_ratelimit = NSEC_PER_SEC; /* 1 second */ |
263 | #endif | 264 | #endif |
264 | 265 | ||
266 | #ifdef CONFIG_COMPACTION | ||
267 | static int min_extfrag_threshold; | ||
268 | static int max_extfrag_threshold = 1000; | ||
269 | #endif | ||
270 | |||
265 | static struct ctl_table kern_table[] = { | 271 | static struct ctl_table kern_table[] = { |
266 | { | 272 | { |
267 | .procname = "sched_child_runs_first", | 273 | .procname = "sched_child_runs_first", |
@@ -1121,6 +1127,25 @@ static struct ctl_table vm_table[] = { | |||
1121 | .mode = 0644, | 1127 | .mode = 0644, |
1122 | .proc_handler = drop_caches_sysctl_handler, | 1128 | .proc_handler = drop_caches_sysctl_handler, |
1123 | }, | 1129 | }, |
1130 | #ifdef CONFIG_COMPACTION | ||
1131 | { | ||
1132 | .procname = "compact_memory", | ||
1133 | .data = &sysctl_compact_memory, | ||
1134 | .maxlen = sizeof(int), | ||
1135 | .mode = 0200, | ||
1136 | .proc_handler = sysctl_compaction_handler, | ||
1137 | }, | ||
1138 | { | ||
1139 | .procname = "extfrag_threshold", | ||
1140 | .data = &sysctl_extfrag_threshold, | ||
1141 | .maxlen = sizeof(int), | ||
1142 | .mode = 0644, | ||
1143 | .proc_handler = sysctl_extfrag_handler, | ||
1144 | .extra1 = &min_extfrag_threshold, | ||
1145 | .extra2 = &max_extfrag_threshold, | ||
1146 | }, | ||
1147 | |||
1148 | #endif /* CONFIG_COMPACTION */ | ||
1124 | { | 1149 | { |
1125 | .procname = "min_free_kbytes", | 1150 | .procname = "min_free_kbytes", |
1126 | .data = &min_free_kbytes, | 1151 | .data = &min_free_kbytes, |