svn commit: r215093 - in head/sys: sparc64/include vm

Alan Cox alc at FreeBSD.org
Wed Nov 10 17:57:34 UTC 2010


Author: alc
Date: Wed Nov 10 17:57:34 2010
New Revision: 215093
URL: http://svn.freebsd.org/changeset/base/215093

Log:
  Enable reservation-based physical memory allocation.  Even without the
  creation of large page mappings in the pmap, it can provide modest
  performance benefits.  In particular, for a "buildworld" on a 2x 1GHz
  Ultrasparc IIIi it reduced the wall clock time by 2.2% and the system
  time by 12.6%.
  
  Tested by:	marius@

Modified:
  head/sys/sparc64/include/vmparam.h
  head/sys/vm/vm_reserv.c

Modified: head/sys/sparc64/include/vmparam.h
==============================================================================
--- head/sys/sparc64/include/vmparam.h	Wed Nov 10 17:33:47 2010	(r215092)
+++ head/sys/sparc64/include/vmparam.h	Wed Nov 10 17:57:34 2010	(r215093)
@@ -128,10 +128,17 @@
 #endif
 
 /*
- * Disable superpage reservations.
+ * Enable superpage reservations: 1 level.
  */
 #ifndef	VM_NRESERVLEVEL
-#define	VM_NRESERVLEVEL		0
+#define	VM_NRESERVLEVEL		1
+#endif
+
+/*
+ * Level 0 reservations consist of 512 pages.
+ */
+#ifndef	VM_LEVEL_0_ORDER
+#define	VM_LEVEL_0_ORDER	9
 #endif
 
 /*

Modified: head/sys/vm/vm_reserv.c
==============================================================================
--- head/sys/vm/vm_reserv.c	Wed Nov 10 17:33:47 2010	(r215092)
+++ head/sys/vm/vm_reserv.c	Wed Nov 10 17:57:34 2010	(r215093)
@@ -194,7 +194,7 @@ sysctl_vm_reserv_partpopq(SYSCTL_HANDLER
 		}
 		mtx_unlock(&vm_page_queue_free_mtx);
 		sbuf_printf(&sbuf, "%5d: %6dK, %6d\n", level,
-		    unused_pages * (PAGE_SIZE / 1024), counter);
+		    unused_pages * ((int)PAGE_SIZE / 1024), counter);
 	}
 	error = sbuf_finish(&sbuf);
 	sbuf_delete(&sbuf);


More information about the svn-src-all mailing list