Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm uvm_pageinsert, uvm_pageremove: Pass the uboj, to/fr...
details: https://anonhg.NetBSD.org/src/rev/ac509f50bfa5
branches: trunk
changeset: 751177:ac509f50bfa5
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Wed Jan 27 03:56:33 2010 +0000
description:
uvm_pageinsert, uvm_pageremove: Pass the uboj, to/from which a pg is
inserted/removed, as an argument, because looking up a back-reference from
pg is redundant. No functional changes.
diffstat:
sys/uvm/uvm_page.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diffs (100 lines):
diff -r 001c6962885b -r ac509f50bfa5 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Tue Jan 26 22:35:11 2010 +0000
+++ b/sys/uvm/uvm_page.c Wed Jan 27 03:56:33 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.152 2009/11/07 07:27:50 cegger Exp $ */
+/* $NetBSD: uvm_page.c,v 1.153 2010/01/27 03:56:33 uebayasi Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.152 2009/11/07 07:27:50 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153 2010/01/27 03:56:33 uebayasi Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -156,8 +156,8 @@
* local prototypes
*/
-static void uvm_pageinsert(struct vm_page *);
-static void uvm_pageremove(struct vm_page *);
+static void uvm_pageinsert(struct uvm_object *, struct vm_page *);
+static void uvm_pageremove(struct uvm_object *, struct vm_page *);
/*
* per-object tree of pages
@@ -256,10 +256,10 @@
}
static inline void
-uvm_pageinsert(struct vm_page *pg)
+uvm_pageinsert(struct uvm_object *uobj, struct vm_page *pg)
{
- struct uvm_object *uobj = pg->uobject;
+ KDASSERT(uobj != NULL);
uvm_pageinsert_tree(uobj, pg);
uvm_pageinsert_list(uobj, pg, NULL);
}
@@ -310,10 +310,10 @@
}
static inline void
-uvm_pageremove(struct vm_page *pg)
+uvm_pageremove(struct uvm_object *uobj, struct vm_page *pg)
{
- struct uvm_object *uobj = pg->uobject;
+ KDASSERT(uobj != NULL);
uvm_pageremove_tree(uobj, pg);
uvm_pageremove_list(uobj, pg);
}
@@ -1216,7 +1216,7 @@
atomic_inc_uint(&uvmexp.anonpages);
} else {
if (obj) {
- uvm_pageinsert(pg);
+ uvm_pageinsert(obj, pg);
}
pg->pqflags = 0;
}
@@ -1284,7 +1284,7 @@
*/
if (pg->uobject) {
- uvm_pageremove(pg);
+ uvm_pageremove(pg->uobject, pg);
}
/*
@@ -1294,7 +1294,7 @@
if (newobj) {
pg->uobject = newobj;
pg->offset = newoff;
- uvm_pageinsert(pg);
+ uvm_pageinsert(newobj, pg);
}
}
@@ -1386,7 +1386,7 @@
*/
if (pg->uobject != NULL) {
- uvm_pageremove(pg);
+ uvm_pageremove(pg->uobject, pg);
pg->flags &= ~PG_CLEAN;
} else if (pg->uanon != NULL) {
if ((pg->pqflags & PQ_ANON) == 0) {
@@ -1419,7 +1419,7 @@
*/
if (pg->uobject != NULL) {
- uvm_pageremove(pg);
+ uvm_pageremove(pg->uobject, pg);
} else if (pg->uanon != NULL) {
pg->uanon->an_page = NULL;
atomic_dec_uint(&uvmexp.anonpages);
Home |
Main Index |
Thread Index |
Old Index