Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Consistently call amap / uobj layers as upper / lowe...
details: https://anonhg.NetBSD.org/src/rev/5afef512568e
branches: trunk
changeset: 748680:5afef512568e
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Sun Nov 01 11:16:32 2009 +0000
description:
Consistently call amap / uobj layers as upper / lower, because UVM has only
those two layers by design. Approved by Chuck Cranor some time ago.
diffstat:
sys/uvm/uvm_fault.c | 16 ++++++++--------
sys/uvm/uvm_map.c | 8 ++++----
sys/uvm/uvm_mmap.c | 12 ++++++------
3 files changed, 18 insertions(+), 18 deletions(-)
diffs (137 lines):
diff -r 2d966ede1cfd -r 5afef512568e sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c Sun Nov 01 07:23:13 2009 +0000
+++ b/sys/uvm/uvm_fault.c Sun Nov 01 11:16:32 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.126 2008/12/20 11:33:38 ad Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.127 2009/11/01 11:16:32 uebayasi Exp $ */
/*
*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.126 2008/12/20 11:33:38 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.127 2009/11/01 11:16:32 uebayasi Exp $");
#include "opt_uvmhist.h"
@@ -65,11 +65,11 @@
* read/write1 write>1 read/write +-cow_write/zero
* | | | |
* +--|--+ +--|--+ +-----+ + | + | +-----+
- * amap | V | | ----------->new| | | | ^ |
+ * amap | V | | ---------> new | | | | ^ |
* +-----+ +-----+ +-----+ + | + | +--|--+
* | | |
* +-----+ +-----+ +--|--+ | +--|--+
- * uobj | d/c | | d/c | | V | +----| |
+ * uobj | d/c | | d/c | | V | +----+ |
* +-----+ +-----+ +-----+ +-----+
*
* d/c = don't care
@@ -79,7 +79,7 @@
*
* case [1]: upper layer fault [anon active]
* 1A: [read] or [write with anon->an_ref == 1]
- * I/O takes place in top level anon and uobj is not touched.
+ * I/O takes place in upper level anon and uobj is not touched.
* 1B: [write with anon->an_ref > 1]
* new anon is alloc'd and data is copied off ["COW"]
*
@@ -822,8 +822,8 @@
* identify the players
*/
- amap = ufi.entry->aref.ar_amap; /* top layer */
- uobj = ufi.entry->object.uvm_obj; /* bottom layer */
+ amap = ufi.entry->aref.ar_amap; /* upper layer */
+ uobj = ufi.entry->object.uvm_obj; /* lower layer */
/*
* check for a case 0 fault. if nothing backing the entry then
@@ -1159,7 +1159,7 @@
/*
* note that at this point we are done with any front or back pages.
* we are now going to focus on the center page (i.e. the one we've
- * faulted on). if we have faulted on the top (anon) layer
+ * faulted on). if we have faulted on the upper (anon) layer
* [i.e. case 1], then the anon we want is anons[centeridx] (we have
* not touched it yet). if we have faulted on the bottom (uobj)
* layer [i.e. case 2] and the page was both present and available,
diff -r 2d966ede1cfd -r 5afef512568e sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Sun Nov 01 07:23:13 2009 +0000
+++ b/sys/uvm/uvm_map.c Sun Nov 01 11:16:32 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.282 2009/09/06 23:14:19 rmind Exp $ */
+/* $NetBSD: uvm_map.c,v 1.283 2009/11/01 11:16:32 uebayasi Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.282 2009/09/06 23:14:19 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.283 2009/11/01 11:16:32 uebayasi Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -3934,8 +3934,8 @@
error = 0;
for (current = entry; start < end; current = current->next) {
- amap = current->aref.ar_amap; /* top layer */
- uobj = current->object.uvm_obj; /* bottom layer */
+ amap = current->aref.ar_amap; /* upper layer */
+ uobj = current->object.uvm_obj; /* lower layer */
KASSERT(start >= current->start);
/*
diff -r 2d966ede1cfd -r 5afef512568e sys/uvm/uvm_mmap.c
--- a/sys/uvm/uvm_mmap.c Sun Nov 01 07:23:13 2009 +0000
+++ b/sys/uvm/uvm_mmap.c Sun Nov 01 11:16:32 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_mmap.c,v 1.131 2009/08/18 02:41:31 yamt Exp $ */
+/* $NetBSD: uvm_mmap.c,v 1.132 2009/11/01 11:16:32 uebayasi Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -51,7 +51,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.131 2009/08/18 02:41:31 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.132 2009/11/01 11:16:32 uebayasi Exp $");
#include "opt_compat_netbsd.h"
#include "opt_pax.h"
@@ -226,8 +226,8 @@
}
}
- amap = entry->aref.ar_amap; /* top layer */
- uobj = entry->object.uvm_obj; /* bottom layer */
+ amap = entry->aref.ar_amap; /* upper layer */
+ uobj = entry->object.uvm_obj; /* lower layer */
if (amap != NULL)
amap_lock(amap);
@@ -237,7 +237,7 @@
for (/* nothing */; start < lim; start += PAGE_SIZE, vec++) {
pgi = 0;
if (amap != NULL) {
- /* Check the top layer first. */
+ /* Check the upper layer first. */
anon = amap_lookup(&entry->aref,
start - entry->start);
/* Don't need to lock anon here. */
@@ -252,7 +252,7 @@
}
}
if (uobj != NULL && pgi == 0) {
- /* Check the bottom layer. */
+ /* Check the lower layer. */
pg = uvm_pagelookup(uobj,
entry->offset + (start - entry->start));
if (pg != NULL) {
Home |
Main Index |
Thread Index |
Old Index