Module Name: src
Committed By: uebayasi
Date: Wed Feb 24 06:18:19 UTC 2010
Modified Files:
src/sys/uvm: uvm_fault.c
Log Message:
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.)
To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/uvm/uvm_fault.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.171 src/sys/uvm/uvm_fault.c:1.172
--- src/sys/uvm/uvm_fault.c:1.171 Wed Feb 24 05:26:28 2010
+++ src/sys/uvm/uvm_fault.c Wed Feb 24 06:18:19 2010
@@ -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);
}