From 64e3b6b67906efd7dcd2e50e8dc561cef86e5ce0 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 23 Aug 2004 21:12:13 -0700 Subject: [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 hugetlb CONFIG_SYSCTL=n fix Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/sysctl.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'kernel') 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 #include +#include #ifdef CONFIG_ROOT_NFS #include @@ -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 } }; -- cgit v1.2.3