Module Name:    src
Committed By:   matt
Date:           Sat Feb  6 05:28:30 UTC 2010

Modified Files:
        src/sys/arch/mips/include [matt-nb5-mips64]: vmparam.h
        src/sys/uvm [matt-nb5-mips64]: uvm_km.c

Log Message:
Allow uvm_km_alloc to allocate from a specific vm freelist if the port wants
it to.


To generate a diff of this commit:
cvs rdiff -u -r1.41.28.10 -r1.41.28.11 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.101.4.2.4.2 -r1.101.4.2.4.3 src/sys/uvm/uvm_km.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/include/vmparam.h
diff -u src/sys/arch/mips/include/vmparam.h:1.41.28.10 src/sys/arch/mips/include/vmparam.h:1.41.28.11
--- src/sys/arch/mips/include/vmparam.h:1.41.28.10	Tue Jan 26 21:19:25 2010
+++ src/sys/arch/mips/include/vmparam.h	Sat Feb  6 05:28:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.41.28.10 2010/01/26 21:19:25 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.41.28.11 2010/02/06 05:28:30 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -261,4 +261,9 @@
 #define VM_FREELIST_MAX		1
 #endif
 
+#ifdef _KERNEL
+#define	UVM_KM_VMFREELIST	mips_poolpage_vmfreelist
+extern int mips_poolpage_vmfreelist;
+#endif
+
 #endif /* ! _MIPS_VMPARAM_H_ */

Index: src/sys/uvm/uvm_km.c
diff -u src/sys/uvm/uvm_km.c:1.101.4.2.4.2 src/sys/uvm/uvm_km.c:1.101.4.2.4.3
--- src/sys/uvm/uvm_km.c:1.101.4.2.4.2	Tue Jan 26 21:26:28 2010
+++ src/sys/uvm/uvm_km.c	Sat Feb  6 05:28:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_km.c,v 1.101.4.2.4.2 2010/01/26 21:26:28 matt Exp $	*/
+/*	$NetBSD: uvm_km.c,v 1.101.4.2.4.3 2010/02/06 05:28:30 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -128,7 +128,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.101.4.2.4.2 2010/01/26 21:26:28 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.101.4.2.4.3 2010/02/06 05:28:30 matt Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -600,7 +600,13 @@
 	while (loopsize) {
 		KASSERT(!pmap_extract(pmap_kernel(), loopva, NULL));
 
-		pg = uvm_pagealloc(NULL, offset, NULL, pgaflags);
+		pg = uvm_pagealloc_strat(NULL, offset, NULL, pgaflags,
+#ifdef UVM_KM_VMFREELIST
+		   UVM_PGA_STRAT_ONLY, UVM_KM_VMFREELIST
+#else
+		   UVM_PGA_STRAT_NORMAL, 0
+#endif
+		   );
 
 		/*
 		 * out of memory?

Reply via email to