Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Allocate color appropriate pages.
details: https://anonhg.NetBSD.org/src/rev/914a8316c6ed
branches: trunk
changeset: 769315:914a8316c6ed
user: matt <matt%NetBSD.org@localhost>
date: Tue Sep 06 16:41:55 2011 +0000
description:
Allocate color appropriate pages.
diffstat:
sys/uvm/uvm_aobj.c | 6 +++---
sys/uvm/uvm_vnode.c | 16 ++++++++++------
2 files changed, 13 insertions(+), 9 deletions(-)
diffs (85 lines):
diff -r 9fe347c861f5 -r 914a8316c6ed sys/uvm/uvm_aobj.c
--- a/sys/uvm/uvm_aobj.c Tue Sep 06 14:40:10 2011 +0000
+++ b/sys/uvm/uvm_aobj.c Tue Sep 06 16:41:55 2011 +0000
@@ -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);
diff -r 9fe347c861f5 -r 914a8316c6ed sys/uvm/uvm_vnode.c
--- a/sys/uvm/uvm_vnode.c Tue Sep 06 14:40:10 2011 +0000
+++ b/sys/uvm/uvm_vnode.c Tue Sep 06 16:41:55 2011 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index