Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Don't use pmap_kenter_pgs() for entering pager_map m...



details:   https://anonhg.NetBSD.org/src/rev/62de28355050
branches:  trunk
changeset: 473208:62de28355050
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon May 24 23:30:44 1999 +0000

description:
Don't use pmap_kenter_pgs() for entering pager_map mappings.  The pages
are still owned by the object which is paging, and so the test for a kernel
object in uvm_unmap_remove() will cause pmap_remove() to be used instead
of pmap_kremove().

This was a MAJOR source of pmap_remove() vs pmap_kremove() inconsistency
(which caused the busted kernel pmap statistics, and a cause of much
locking hair on MP systems).

diffstat:

 sys/uvm/uvm_pager.c |  16 +---------------
 1 files changed, 1 insertions(+), 15 deletions(-)

diffs (46 lines):

diff -r 658ff0175f8f -r 62de28355050 sys/uvm/uvm_pager.c
--- a/sys/uvm/uvm_pager.c       Mon May 24 23:06:00 1999 +0000
+++ b/sys/uvm/uvm_pager.c       Mon May 24 23:30:44 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pager.c,v 1.16 1999/03/26 21:58:39 mycroft Exp $   */
+/*     $NetBSD: uvm_pager.c,v 1.17 1999/05/24 23:30:44 thorpej Exp $   */
 
 /*
  *
@@ -128,10 +128,8 @@
        vsize_t size;
        vaddr_t kva;
        struct uvm_aiodesc *aio;
-#if !defined(PMAP_NEW)
        vaddr_t cva;
        struct vm_page *pp;
-#endif
        UVMHIST_FUNC("uvm_pagermapin"); UVMHIST_CALLED(maphist);
 
        UVMHIST_LOG(maphist,"(pps=0x%x, npages=%d, aiop=0x%x, waitf=%d)",
@@ -166,16 +164,6 @@
                goto ReStart;
        }
 
-#if defined(PMAP_NEW)
-       /*
-        * XXX: (ab)using the pmap module to store state info for us.
-        * (pmap stores the PAs... we fetch them back later and convert back
-        * to pages with PHYS_TO_VM_PAGE).
-        */
-       pmap_kenter_pgs(kva, pps, npages);
-
-#else /* PMAP_NEW */
-
        /* got it */
        for (cva = kva ; size != 0 ; size -= PAGE_SIZE, cva += PAGE_SIZE) {
                pp = *pps++;
@@ -188,8 +176,6 @@
                    VM_PROT_DEFAULT, TRUE, 0);
        }
 
-#endif /* PMAP_NEW */
-
        UVMHIST_LOG(maphist, "<- done (KVA=0x%x)", kva,0,0,0);
        return(kva);
 }



Home | Main Index | Thread Index | Old Index