aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorHideo Aoki <aoki@sdl.hitachi.co.jp>2004-10-19 18:36:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-19 18:36:36 -0700
commit1caf076bd632994f89979fcc1584c3457a04ddcd (patch)
tree30ba3acb2c51c61e6bf3b5509010edd3dc1d48a9 /kernel
parent2850479a63f2505e8d6fdac8e111bbdf82f1bfb9 (diff)
downloadhistory-1caf076bd632994f89979fcc1584c3457a04ddcd.tar.gz
[PATCH] vm thrashing control tuning
This patch adds "swap_token_timeout" parameter in /proc/sys/vm. The parameter means expired time of token. Unit of the value is HZ, and the default value is the same as current SWAP_TOKEN_TIMEOUT (i.e. HZ * 300). Signed-off-by: Hideo Aoki <aoki@sdl.hitachi.co.jp> 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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 80bf15f035cde2..fed8d5a8aa626c 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -783,6 +783,7 @@ static ctl_table vm_table[] = {
.strategy = &sysctl_intvec,
.extra1 = &zero,
},
+#ifdef CONFIG_SWAP
{
.ctl_name = VM_VFS_CACHE_PRESSURE,
.procname = "vfs_cache_pressure",
@@ -805,6 +806,15 @@ static ctl_table vm_table[] = {
.extra1 = &zero,
},
#endif
+ {
+ .ctl_name = VM_SWAP_TOKEN_TIMEOUT,
+ .procname = "swap_token_timeout",
+ .data = &swap_token_default_timeout,
+ .maxlen = sizeof(swap_token_default_timeout),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_jiffies,
+ .strategy = &sysctl_jiffies,
+ },
{ .ctl_name = 0 }
};
@@ -915,6 +925,7 @@ static ctl_table fs_table[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
+#endif
{ .ctl_name = 0 }
};