summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorDavid S. Miller2008-11-17 08:49:24 +0100
committerDavid S. Miller2008-12-04 18:16:59 +0100
commit0871420fad5844cb63cfcf85508c17bd9b15c08f (patch)
tree41909ff5855dead73c915af1300dc6b36d13ffe5 /kernel/sysctl.c
parentsparc,sparc64: unify mm/ (diff)
downloadkernel-qcow2-linux-0871420fad5844cb63cfcf85508c17bd9b15c08f.tar.gz
kernel-qcow2-linux-0871420fad5844cb63cfcf85508c17bd9b15c08f.tar.xz
kernel-qcow2-linux-0871420fad5844cb63cfcf85508c17bd9b15c08f.zip
sparc64: Add tsb-ratio sysctl.
Add a sysctl to tweak the RSS limit used to decide when to grow the TSB for an address space. In order to avoid expensive divides and multiplies only simply positive and negative powers of two are supported. The function computed takes the number of TSB translations that will fit at one time in the TSB of a given size, and either adds or subtracts a percentage of entries. This final value is the RSS limit. See tsb_size_to_rss_limit(). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 3d56fe7570da..4e2ac0aec9b0 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -121,6 +121,10 @@ extern int sg_big_buff;
#include <asm/system.h>
#endif
+#ifdef CONFIG_SPARC64
+extern int sysctl_tsb_ratio;
+#endif
+
#ifdef __hppa__
extern int pwrsw_enabled;
extern int unaligned_enabled;
@@ -451,6 +455,16 @@ static struct ctl_table kern_table[] = {
.proc_handler = &proc_dointvec,
},
#endif
+#ifdef CONFIG_SPARC64
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "tsb-ratio",
+ .data = &sysctl_tsb_ratio,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+#endif
#ifdef __hppa__
{
.ctl_name = KERN_HPPA_PWRSW,