PERFORCE change 38819 for review
Peter Wemm
peter at FreeBSD.org
Mon Sep 29 17:31:11 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=38819
Change 38819 by peter at peter_hammer on 2003/09/29 17:30:33
lazy_switch is very premature here
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/pmap.c#37 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#37 (text+ko) ====
@@ -168,9 +168,11 @@
LIST_HEAD(pmaplist, pmap);
static struct pmaplist allpmaps;
static struct mtx allpmaps_lock;
+#ifdef LAZY_SWITCH
#ifdef SMP
static struct mtx lazypmap_lock;
#endif
+#endif
vm_paddr_t avail_start; /* PA of first available physical page */
vm_paddr_t avail_end; /* PA of last available physical page */
@@ -485,9 +487,11 @@
kernel_pmap->pm_active = -1; /* don't allow deactivation */
TAILQ_INIT(&kernel_pmap->pm_pvlist);
LIST_INIT(&allpmaps);
+#ifdef LAZY_SWITCH
#ifdef SMP
mtx_init(&lazypmap_lock, "lazypmap", NULL, MTX_SPIN);
#endif
+#endif
mtx_init(&allpmaps_lock, "allpmaps", NULL, MTX_SPIN);
mtx_lock_spin(&allpmaps_lock);
LIST_INSERT_HEAD(&allpmaps, kernel_pmap, pm_list);
@@ -1381,6 +1385,7 @@
* Pmap allocation/deallocation routines.
***************************************************/
+#ifdef LAZY_SWITCH
#ifdef SMP
/*
* Deal with a SMP shootdown of other users of the pmap that we are
@@ -1465,6 +1470,7 @@
}
}
#endif /* SMP */
+#endif
/*
* Release any resources held by the given physical map.
@@ -1480,7 +1486,9 @@
("pmap_release: pmap resident count %ld != 0",
pmap->pm_stats.resident_count));
+#ifdef LAZY_SWITCH
pmap_lazyfix(pmap);
+#endif
mtx_lock_spin(&allpmaps_lock);
LIST_REMOVE(pmap, pm_list);
mtx_unlock_spin(&allpmaps_lock);
More information about the p4-projects
mailing list