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_internal: In lower fault handling case, pu...



details:   https://anonhg.NetBSD.org/src/rev/5fa8bd7b3bc8
branches:  trunk
changeset: 751290:5fa8bd7b3bc8
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Sun Jan 31 07:46:03 2010 +0000

description:
uvm_fault_internal: In lower fault handling case, put another goto to clarify
that we don't care lower neighboring pages for the zero-fill object.

diffstat:

 sys/uvm/uvm_fault.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (44 lines):

diff -r c302d9554172 -r 5fa8bd7b3bc8 sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c       Sun Jan 31 07:37:24 2010 +0000
+++ b/sys/uvm/uvm_fault.c       Sun Jan 31 07:46:03 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_fault.c,v 1.134 2010/01/31 07:37:24 uebayasi Exp $ */
+/*     $NetBSD: uvm_fault.c,v 1.135 2010/01/31 07:46:03 uebayasi Exp $ */
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.134 2010/01/31 07:37:24 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.135 2010/01/31 07:46:03 uebayasi Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -1045,7 +1045,12 @@
         * (PGO_LOCKED).
         */
 
-       if (uobj) {
+       if (uobj == NULL) {
+               /* zero fill; don't care neighbor pages */
+               uobjpage = NULL;
+               goto lower_fault_lookup_done;
+       }
+
                mutex_enter(&uobj->vmobjlock);
                /* locked (!shadowed): maps(read), amap (if there), uobj */
                /*
@@ -1147,10 +1152,7 @@
                        pmap_update(ufi.orig_map->pmap);
 
 lower_fault_lookup_done:
-               {}
-       } else {
-               uobjpage = NULL;
-       }
+       {}
 
        /* locked: maps(read), amap(if there), uobj(if !null), uobjpage(if !null) */
        KASSERT(!shadowed);



Home | Main Index | Thread Index | Old Index