Module Name:    src
Committed By:   matt
Date:           Tue Sep  6 16:41:55 UTC 2011

Modified Files:
        src/sys/uvm: uvm_aobj.c uvm_vnode.c

Log Message:
Allocate color appropriate pages.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.96 -r1.97 src/sys/uvm/uvm_vnode.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/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.115 src/sys/uvm/uvm_aobj.c:1.116
--- src/sys/uvm/uvm_aobj.c:1.115	Sun Jun 12 03:36:02 2011
+++ src/sys/uvm/uvm_aobj.c	Tue Sep  6 16:41:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_aobj.c,v 1.115 2011/06/12 03:36:02 rmind Exp $	*/
+/*	$NetBSD: uvm_aobj.c,v 1.116 2011/09/06 16:41:55 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.115 2011/06/12 03:36:02 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.116 2011/09/06 16:41:55 matt Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -962,7 +962,7 @@
 			if (ptmp == NULL && uao_find_swslot(&aobj->u_obj,
 			    current_offset >> PAGE_SHIFT) == 0) {
 				ptmp = uvm_pagealloc(uobj, current_offset,
-				    NULL, UVM_PGA_ZERO);
+				    NULL, UVM_FLAG_COLORMATCH|UVM_PGA_ZERO);
 				if (ptmp) {
 					/* new page */
 					ptmp->flags &= ~(PG_FAKE);

Index: src/sys/uvm/uvm_vnode.c
diff -u src/sys/uvm/uvm_vnode.c:1.96 src/sys/uvm/uvm_vnode.c:1.97
--- src/sys/uvm/uvm_vnode.c:1.96	Sun Jun 12 03:36:04 2011
+++ src/sys/uvm/uvm_vnode.c	Tue Sep  6 16:41:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_vnode.c,v 1.96 2011/06/12 03:36:04 rmind Exp $	*/
+/*	$NetBSD: uvm_vnode.c,v 1.97 2011/09/06 16:41:55 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.96 2011/06/12 03:36:04 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.97 2011/09/06 16:41:55 matt Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -250,7 +250,8 @@
 				UVMHIST_LOG(ubchist, "noalloc", 0,0,0,0);
 				return 0;
 			}
-			pg = uvm_pagealloc(uobj, offset, NULL, 0);
+			pg = uvm_pagealloc(uobj, offset, NULL,
+			    UVM_FLAG_COLORMATCH);
 			if (pg == NULL) {
 				if (flags & UFP_NOWAIT) {
 					UVMHIST_LOG(ubchist, "nowait",0,0,0,0);
@@ -261,7 +262,8 @@
 				mutex_enter(uobj->vmobjlock);
 				continue;
 			}
-			UVMHIST_LOG(ubchist, "alloced %p", pg,0,0,0);
+			UVMHIST_LOG(ubchist, "alloced %p (color %u)", pg,
+			    VM_PGCOLOR_BUCKET(pg), 0,0);
 			break;
 		} else if (flags & UFP_NOCACHE) {
 			UVMHIST_LOG(ubchist, "nocache",0,0,0,0);
@@ -275,7 +277,8 @@
 				return 0;
 			}
 			pg->flags |= PG_WANTED;
-			UVMHIST_LOG(ubchist, "wait %p", pg,0,0,0);
+			UVMHIST_LOG(ubchist, "wait %p (color %u)", pg,
+			    VM_PGCOLOR_BUCKET(pg), 0,0);
 			UVM_UNLOCK_AND_WAIT(pg, uobj->vmobjlock, 0,
 					    "uvn_fp2", 0);
 			mutex_enter(uobj->vmobjlock);
@@ -302,7 +305,8 @@
 		/* mark the page BUSY and we're done. */
 		pg->flags |= PG_BUSY;
 		UVM_PAGE_OWN(pg, "uvn_findpage");
-		UVMHIST_LOG(ubchist, "found %p", pg,0,0,0);
+		UVMHIST_LOG(ubchist, "found %p (color %u)",
+		    pg, VM_PGCOLOR_BUCKET(pg), 0,0);
 		break;
 	}
 	*pgp = pg;

Reply via email to