summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorArjan van de Ven <arjanv@redhat.com>2004-08-23 21:12:13 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-23 21:12:13 -0700
commit64e3b6b67906efd7dcd2e50e8dc561cef86e5ce0 (patch)
tree716dc2d96178b5c78f90d73f07974d0a1dbb88ff /kernel
parent8fead718405ab6e11125661b3a1e29a9d3fe233c (diff)
[PATCH] sysctl tunable for flexmmap
Create /proc/sys/vm/legacy_va_layout. If this is non-zero, the kernel will use the old mmap layout for all tasks. it presently defaults to zero (the new layout). From: William Lee Irwin III <wli@holomorphy.com> hugetlb CONFIG_SYSCTL=n fix Signed-off-by: Ingo Molnar <mingo@elte.hu> 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.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 2c5c58279f81..4a361348038e 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -42,6 +42,7 @@
#include <linux/dcache.h>
#include <asm/uaccess.h>
+#include <asm/processor.h>
#ifdef CONFIG_ROOT_NFS
#include <linux/nfs_fs.h>
@@ -149,6 +150,10 @@ extern ctl_table random_table[];
extern ctl_table pty_table[];
#endif
+#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
+int sysctl_legacy_va_layout;
+#endif
+
/* /proc declarations: */
#ifdef CONFIG_PROC_FS
@@ -805,6 +810,18 @@ static ctl_table vm_table[] = {
.strategy = &sysctl_intvec,
.extra1 = &zero,
},
+#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
+ {
+ .ctl_name = VM_LEGACY_VA_LAYOUT,
+ .procname = "legacy_va_layout",
+ .data = &sysctl_legacy_va_layout,
+ .maxlen = sizeof(sysctl_legacy_va_layout),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ },
+#endif
{ .ctl_name = 0 }
};