diff options
author | Rohit Seth <rohit.seth@intel.com> | 2006-01-08 04:00:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:12:40 -0500 |
commit | 8ad4b1fb8205340dba16b63467bb23efc27264d6 (patch) | |
tree | 9f5c237ead93976e5454c5da5d3bba350a2419c5 /kernel | |
parent | 9d0243bca345d5ce25d3f4b74b7facb3a6df1232 (diff) |
[PATCH] Make high and batch sizes of per_cpu_pagelists configurable
As recently there has been lot of traffic on the right values for batch and
high water marks for per_cpu_pagelists. This patch makes these two
variables configurable through /proc interface.
A new tunable /proc/sys/vm/percpu_pagelist_fraction is added. This entry
controls the fraction of pages at most in each zone that are allocated for
each per cpu page list. The min value for this is 8. It means that we
don't allow more than 1/8th of pages in each zone to be allocated in any
single per_cpu_pagelist.
The batch value of each per cpu pagelist is also updated as a result. It
is set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
Signed-off-by: Rohit Seth <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sysctl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8dcf6fd5b0f9..03b0598f2369 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -69,6 +69,7 @@ extern int printk_ratelimit_jiffies; | |||
69 | extern int printk_ratelimit_burst; | 69 | extern int printk_ratelimit_burst; |
70 | extern int pid_max_min, pid_max_max; | 70 | extern int pid_max_min, pid_max_max; |
71 | extern int sysctl_drop_caches; | 71 | extern int sysctl_drop_caches; |
72 | extern int percpu_pagelist_fraction; | ||
72 | 73 | ||
73 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) | 74 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) |
74 | int unknown_nmi_panic; | 75 | int unknown_nmi_panic; |
@@ -79,6 +80,7 @@ extern int proc_unknown_nmi_panic(ctl_table *, int, struct file *, | |||
79 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ | 80 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ |
80 | static int maxolduid = 65535; | 81 | static int maxolduid = 65535; |
81 | static int minolduid; | 82 | static int minolduid; |
83 | static int min_percpu_pagelist_fract = 8; | ||
82 | 84 | ||
83 | static int ngroups_max = NGROUPS_MAX; | 85 | static int ngroups_max = NGROUPS_MAX; |
84 | 86 | ||
@@ -794,6 +796,16 @@ static ctl_table vm_table[] = { | |||
794 | .strategy = &sysctl_intvec, | 796 | .strategy = &sysctl_intvec, |
795 | .extra1 = &zero, | 797 | .extra1 = &zero, |
796 | }, | 798 | }, |
799 | { | ||
800 | .ctl_name = VM_PERCPU_PAGELIST_FRACTION, | ||
801 | .procname = "percpu_pagelist_fraction", | ||
802 | .data = &percpu_pagelist_fraction, | ||
803 | .maxlen = sizeof(percpu_pagelist_fraction), | ||
804 | .mode = 0644, | ||
805 | .proc_handler = &percpu_pagelist_fraction_sysctl_handler, | ||
806 | .strategy = &sysctl_intvec, | ||
807 | .extra1 = &min_percpu_pagelist_fract, | ||
808 | }, | ||
797 | #ifdef CONFIG_MMU | 809 | #ifdef CONFIG_MMU |
798 | { | 810 | { |
799 | .ctl_name = VM_MAX_MAP_COUNT, | 811 | .ctl_name = VM_MAX_MAP_COUNT, |