Consistently call amap / uobj layers as upper / lower, because UVM has only
those two layers by design. Approved by Chuck Cranor some time ago.
This commit is contained in:
parent
ecc465882d
commit
55c6ab5c75
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.126 2008/12/20 11:33:38 ad Exp $");
|
|||
* 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 @@ __KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.126 2008/12/20 11:33:38 ad Exp $");
|
|||
*
|
||||
* 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 @@ ReFault:
|
|||
* 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 @@ ReFault:
|
|||
/*
|
||||
* 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,
|
||||
|
|
|
@ -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 @@ uvm_map_clean(struct vm_map *map, vaddr_t start, vaddr_t end, int flags)
|
|||
|
||||
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);
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 @@ sys_mincore(struct lwp *l, const struct sys_mincore_args *uap,
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ sys_mincore(struct lwp *l, const struct sys_mincore_args *uap,
|
|||
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 @@ sys_mincore(struct lwp *l, const struct sys_mincore_args *uap,
|
|||
}
|
||||
}
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue