Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm uvm_fault_upper_lookup, uvm_fault_upper_neighbor: Th...
details: https://anonhg.NetBSD.org/src/rev/b3d43c7dbbd8
branches: trunk
changeset: 752350:b3d43c7dbbd8
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Wed Feb 24 06:18:19 2010 +0000
description:
uvm_fault_upper_lookup, uvm_fault_upper_neighbor: There is no point to call
pmap_update() without calling pmap_enter().
(Probably calling only once after loop (as done in uvm_fault_lower_lookup())
is enough. If done so, other threads see entered neighbor pages as reflected
a little latter.)
diffstat:
sys/uvm/uvm_fault.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diffs (54 lines):
diff -r a48741225d63 -r b3d43c7dbbd8 sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c Wed Feb 24 06:05:35 2010 +0000
+++ b/sys/uvm/uvm_fault.c Wed Feb 24 06:18:19 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.171 2010/02/24 05:26:28 uebayasi Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.172 2010/02/24 06:18:19 uebayasi Exp $ */
/*
*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.171 2010/02/24 05:26:28 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.172 2010/02/24 06:18:19 uebayasi Exp $");
#include "opt_uvmhist.h"
@@ -1111,8 +1111,13 @@
struct vm_anon *anon = anons[lcv];
mutex_enter(&anon->an_lock);
- uvm_fault_upper_neighbor(ufi, flt, currva,
- anon->an_page, anon->an_ref > 1);
+ struct vm_page *pg = anon->an_page;
+
+ /* ignore loaned and busy pages */
+ if (pg != NULL && pg->loan_count == 0 &&
+ (pg->flags & PG_BUSY) == 0)
+ uvm_fault_upper_neighbor(ufi, flt, currva,
+ pg, anon->an_ref > 1);
mutex_exit(&anon->an_lock);
}
}
@@ -1141,11 +1146,6 @@
{
UVMHIST_FUNC("uvm_fault_upper_neighbor"); UVMHIST_CALLED(maphist);
- /* ignore loaned and busy pages */
- if (pg == NULL || pg->loan_count != 0 ||
- (pg->flags & PG_BUSY) != 0)
- goto uvm_fault_upper_lookup_enter_done;
-
mutex_enter(&uvm_pageqlock);
uvm_pageenqueue(pg);
mutex_exit(&uvm_pageqlock);
@@ -1166,7 +1166,6 @@
flt->enter_prot,
PMAP_CANFAIL | (flt->wire_mapping ? PMAP_WIRED : 0));
-uvm_fault_upper_lookup_enter_done:
pmap_update(ufi->orig_map->pmap);
}
Home |
Main Index |
Thread Index |
Old Index