Module Name: src
Committed By: uebayasi
Date: Sun Nov 1 11:16:32 UTC 2009
Modified Files:
src/sys/uvm: uvm_fault.c uvm_map.c uvm_mmap.c
Log Message:
Consistently call amap / uobj layers as upper / lower, because UVM has only
those two layers by design. Approved by Chuck Cranor some time ago.
To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/uvm/uvm_fault.c
cvs rdiff -u -r1.282 -r1.283 src/sys/uvm/uvm_map.c
cvs rdiff -u -r1.131 -r1.132 src/sys/uvm/uvm_mmap.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_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.126 src/sys/uvm/uvm_fault.c:1.127
--- src/sys/uvm/uvm_fault.c:1.126 Sat Dec 20 11:33:38 2008
+++ src/sys/uvm/uvm_fault.c Sun Nov 1 11:16:32 2009
@@ -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,
Index: src/sys/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.282 src/sys/uvm/uvm_map.c:1.283
--- src/sys/uvm/uvm_map.c:1.282 Sun Sep 6 23:14:19 2009
+++ src/sys/uvm/uvm_map.c Sun Nov 1 11:16:32 2009
@@ -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);
/*
Index: src/sys/uvm/uvm_mmap.c
diff -u src/sys/uvm/uvm_mmap.c:1.131 src/sys/uvm/uvm_mmap.c:1.132
--- src/sys/uvm/uvm_mmap.c:1.131 Tue Aug 18 02:41:31 2009
+++ src/sys/uvm/uvm_mmap.c Sun Nov 1 11:16:32 2009
@@ -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) {