Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2009 07:24:06 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r192300 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern vm
Message-ID:  <200905180724.n4I7O6MO053640@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Mon May 18 07:24:06 2009
New Revision: 192300
URL: http://svn.freebsd.org/changeset/base/192300

Log:
  MFC r180308
    Enable the creation of a kmem map larger than 4GB.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/kern_malloc.c
  stable/7/sys/vm/vm_kern.h

Modified: stable/7/sys/kern/kern_malloc.c
==============================================================================
--- stable/7/sys/kern/kern_malloc.c	Mon May 18 07:13:42 2009	(r192299)
+++ stable/7/sys/kern/kern_malloc.c	Mon May 18 07:24:06 2009	(r192300)
@@ -181,19 +181,19 @@ struct {
  */
 static uma_zone_t mt_zone;
 
-u_int vm_kmem_size;
-SYSCTL_UINT(_vm, OID_AUTO, kmem_size, CTLFLAG_RD, &vm_kmem_size, 0,
+u_long vm_kmem_size;
+SYSCTL_ULONG(_vm, OID_AUTO, kmem_size, CTLFLAG_RD, &vm_kmem_size, 0,
     "Size of kernel memory");
 
-u_int vm_kmem_size_min;
-SYSCTL_UINT(_vm, OID_AUTO, kmem_size_min, CTLFLAG_RD, &vm_kmem_size_min, 0,
+static u_long vm_kmem_size_min;
+SYSCTL_ULONG(_vm, OID_AUTO, kmem_size_min, CTLFLAG_RD, &vm_kmem_size_min, 0,
     "Minimum size of kernel memory");
 
-u_int vm_kmem_size_max;
-SYSCTL_UINT(_vm, OID_AUTO, kmem_size_max, CTLFLAG_RD, &vm_kmem_size_max, 0,
+static u_long vm_kmem_size_max;
+SYSCTL_ULONG(_vm, OID_AUTO, kmem_size_max, CTLFLAG_RD, &vm_kmem_size_max, 0,
     "Maximum size of kernel memory");
 
-u_int vm_kmem_size_scale;
+static u_int vm_kmem_size_scale;
 SYSCTL_UINT(_vm, OID_AUTO, kmem_size_scale, CTLFLAG_RD, &vm_kmem_size_scale, 0,
     "Scale factor for kernel memory size");
 
@@ -589,7 +589,7 @@ kmeminit(void *dummy)
 #if defined(VM_KMEM_SIZE_MIN)
 	vm_kmem_size_min = VM_KMEM_SIZE_MIN;
 #endif
-	TUNABLE_INT_FETCH("vm.kmem_size_min", &vm_kmem_size_min);
+	TUNABLE_ULONG_FETCH("vm.kmem_size_min", &vm_kmem_size_min);
 	if (vm_kmem_size_min > 0 && vm_kmem_size < vm_kmem_size_min) {
 		vm_kmem_size = vm_kmem_size_min;
 	}
@@ -597,16 +597,16 @@ kmeminit(void *dummy)
 #if defined(VM_KMEM_SIZE_MAX)
 	vm_kmem_size_max = VM_KMEM_SIZE_MAX;
 #endif
-	TUNABLE_INT_FETCH("vm.kmem_size_max", &vm_kmem_size_max);
+	TUNABLE_ULONG_FETCH("vm.kmem_size_max", &vm_kmem_size_max);
 	if (vm_kmem_size_max > 0 && vm_kmem_size >= vm_kmem_size_max)
 		vm_kmem_size = vm_kmem_size_max;
 
 	/* Allow final override from the kernel environment */
 #ifndef BURN_BRIDGES
-	if (TUNABLE_INT_FETCH("kern.vm.kmem.size", &vm_kmem_size) != 0)
+	if (TUNABLE_ULONG_FETCH("kern.vm.kmem.size", &vm_kmem_size) != 0)
 		printf("kern.vm.kmem.size is now called vm.kmem_size!\n");
 #endif
-	TUNABLE_INT_FETCH("vm.kmem_size", &vm_kmem_size);
+	TUNABLE_ULONG_FETCH("vm.kmem_size", &vm_kmem_size);
 
 	/*
 	 * Limit kmem virtual size to twice the physical memory.

Modified: stable/7/sys/vm/vm_kern.h
==============================================================================
--- stable/7/sys/vm/vm_kern.h	Mon May 18 07:13:42 2009	(r192299)
+++ stable/7/sys/vm/vm_kern.h	Mon May 18 07:24:06 2009	(r192300)
@@ -69,6 +69,6 @@ extern vm_map_t kernel_map;
 extern vm_map_t kmem_map;
 extern vm_map_t exec_map;
 extern vm_map_t pipe_map;
-extern u_int vm_kmem_size;
+extern u_long vm_kmem_size;
 
 #endif				/* _VM_VM_KERN_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905180724.n4I7O6MO053640>