diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index a85047bb5739..cb99a42f8b37 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/sysctl.h> | 26 | #include <linux/sysctl.h> |
27 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
28 | #include <linux/capability.h> | ||
28 | #include <linux/ctype.h> | 29 | #include <linux/ctype.h> |
29 | #include <linux/utsname.h> | 30 | #include <linux/utsname.h> |
30 | #include <linux/capability.h> | 31 | #include <linux/capability.h> |
@@ -68,6 +69,8 @@ extern int min_free_kbytes; | |||
68 | extern int printk_ratelimit_jiffies; | 69 | extern int printk_ratelimit_jiffies; |
69 | extern int printk_ratelimit_burst; | 70 | extern int printk_ratelimit_burst; |
70 | extern int pid_max_min, pid_max_max; | 71 | extern int pid_max_min, pid_max_max; |
72 | extern int sysctl_drop_caches; | ||
73 | extern int percpu_pagelist_fraction; | ||
71 | 74 | ||
72 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) | 75 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) |
73 | int unknown_nmi_panic; | 76 | int unknown_nmi_panic; |
@@ -78,6 +81,7 @@ extern int proc_unknown_nmi_panic(ctl_table *, int, struct file *, | |||
78 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ | 81 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ |
79 | static int maxolduid = 65535; | 82 | static int maxolduid = 65535; |
80 | static int minolduid; | 83 | static int minolduid; |
84 | static int min_percpu_pagelist_fract = 8; | ||
81 | 85 | ||
82 | static int ngroups_max = NGROUPS_MAX; | 86 | static int ngroups_max = NGROUPS_MAX; |
83 | 87 | ||
@@ -644,7 +648,7 @@ static ctl_table kern_table[] = { | |||
644 | .mode = 0644, | 648 | .mode = 0644, |
645 | .proc_handler = &proc_dointvec, | 649 | .proc_handler = &proc_dointvec, |
646 | }, | 650 | }, |
647 | #if defined(CONFIG_S390) | 651 | #if defined(CONFIG_S390) && defined(CONFIG_SMP) |
648 | { | 652 | { |
649 | .ctl_name = KERN_SPIN_RETRY, | 653 | .ctl_name = KERN_SPIN_RETRY, |
650 | .procname = "spin_retry", | 654 | .procname = "spin_retry", |
@@ -775,6 +779,15 @@ static ctl_table vm_table[] = { | |||
775 | .strategy = &sysctl_intvec, | 779 | .strategy = &sysctl_intvec, |
776 | }, | 780 | }, |
777 | { | 781 | { |
782 | .ctl_name = VM_DROP_PAGECACHE, | ||
783 | .procname = "drop_caches", | ||
784 | .data = &sysctl_drop_caches, | ||
785 | .maxlen = sizeof(int), | ||
786 | .mode = 0644, | ||
787 | .proc_handler = drop_caches_sysctl_handler, | ||
788 | .strategy = &sysctl_intvec, | ||
789 | }, | ||
790 | { | ||
778 | .ctl_name = VM_MIN_FREE_KBYTES, | 791 | .ctl_name = VM_MIN_FREE_KBYTES, |
779 | .procname = "min_free_kbytes", | 792 | .procname = "min_free_kbytes", |
780 | .data = &min_free_kbytes, | 793 | .data = &min_free_kbytes, |
@@ -784,6 +797,16 @@ static ctl_table vm_table[] = { | |||
784 | .strategy = &sysctl_intvec, | 797 | .strategy = &sysctl_intvec, |
785 | .extra1 = &zero, | 798 | .extra1 = &zero, |
786 | }, | 799 | }, |
800 | { | ||
801 | .ctl_name = VM_PERCPU_PAGELIST_FRACTION, | ||
802 | .procname = "percpu_pagelist_fraction", | ||
803 | .data = &percpu_pagelist_fraction, | ||
804 | .maxlen = sizeof(percpu_pagelist_fraction), | ||
805 | .mode = 0644, | ||
806 | .proc_handler = &percpu_pagelist_fraction_sysctl_handler, | ||
807 | .strategy = &sysctl_intvec, | ||
808 | .extra1 = &min_percpu_pagelist_fract, | ||
809 | }, | ||
787 | #ifdef CONFIG_MMU | 810 | #ifdef CONFIG_MMU |
788 | { | 811 | { |
789 | .ctl_name = VM_MAX_MAP_COUNT, | 812 | .ctl_name = VM_MAX_MAP_COUNT, |
@@ -847,6 +870,17 @@ static ctl_table vm_table[] = { | |||
847 | .strategy = &sysctl_jiffies, | 870 | .strategy = &sysctl_jiffies, |
848 | }, | 871 | }, |
849 | #endif | 872 | #endif |
873 | #ifdef CONFIG_NUMA | ||
874 | { | ||
875 | .ctl_name = VM_ZONE_RECLAIM_MODE, | ||
876 | .procname = "zone_reclaim_mode", | ||
877 | .data = &zone_reclaim_mode, | ||
878 | .maxlen = sizeof(zone_reclaim_mode), | ||
879 | .mode = 0644, | ||
880 | .proc_handler = &proc_dointvec, | ||
881 | .strategy = &zero, | ||
882 | }, | ||
883 | #endif | ||
850 | { .ctl_name = 0 } | 884 | { .ctl_name = 0 } |
851 | }; | 885 | }; |
852 | 886 | ||