svn commit: r257209 - head/sys/powerpc/include

Nathan Whitehorn nwhitehorn at FreeBSD.org
Sun Oct 27 14:03:52 UTC 2013


Author: nwhitehorn
Date: Sun Oct 27 14:03:51 2013
New Revision: 257209
URL: http://svnweb.freebsd.org/changeset/base/257209

Log:
  Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC.
  
  Requested by:	alc
  MFC after:	1 month

Modified:
  head/sys/powerpc/include/vmparam.h

Modified: head/sys/powerpc/include/vmparam.h
==============================================================================
--- head/sys/powerpc/include/vmparam.h	Sun Oct 27 10:51:34 2013	(r257208)
+++ head/sys/powerpc/include/vmparam.h	Sun Oct 27 14:03:51 2013	(r257209)
@@ -112,6 +112,7 @@
 
 #define	VM_MIN_KERNEL_ADDRESS	KERNBASE
 #define	VM_MAX_KERNEL_ADDRESS	0xf8000000
+#define	VM_MAX_SAFE_KERNEL_ADDRESS	VM_MAX_KERNEL_ADDRESS
 
 #endif /* AIM/E500 */
 
@@ -175,14 +176,21 @@ struct pmap_physseg {
 #define	VM_KMEM_SIZE		(12 * 1024 * 1024)
 #endif
 
-#ifdef __powerpc64__
+/*
+ * How many physical pages per KVA page allocated.
+ * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)
+ * is the total KVA space allocated for kmem_map.
+ */
 #ifndef VM_KMEM_SIZE_SCALE
-#define VM_KMEM_SIZE_SCALE      (3)
+#define VM_KMEM_SIZE_SCALE	(3)
 #endif
 
+/*
+ * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space.
+ */
 #ifndef VM_KMEM_SIZE_MAX
-#define VM_KMEM_SIZE_MAX        0x1c0000000  /* 7 GB */
-#endif
+#define VM_KMEM_SIZE_MAX	((VM_MAX_SAFE_KERNEL_ADDRESS - \
+    VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5)
 #endif
 
 #define	ZERO_REGION_SIZE	(64 * 1024)	/* 64KB */


More information about the svn-src-all mailing list