PERFORCE change 94115 for review
Peter Wemm
peter at FreeBSD.org
Mon Mar 27 16:54:53 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94115
Change 94115 by peter at peter_daintree on 2006/03/27 16:54:45
oops. Since we have to skip PG_W pages, we can't depend on
pc_map[] getting cleaned out as we go. Removal of the sva/eva
bounding turned out to be irrelevant.
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/pmap.c#145 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#145 (text+ko) ====
@@ -2709,16 +2709,17 @@
PMAP_LOCK(pmap);
TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) {
/*
- * XXX optimize more after removal of sva/eva!
- * We can use bsfq to find the next inuse pv instead of
- * the for loop. Since we free as we go, we won't have
- * to skip unfreeable ones that sva/eva might have allowed.
+ * XXX removal of the sva/eva bounding wasn't necessary
+ * after all because we still have to work around the
+ * skipping of a PG_W page. oops.
*/
for (field = 0; field < _NPCM; field++) {
- while ((inuse = (~(pc->pc_map[field])) & pc_freemask[field]) != 0) {
+ inuse = (~(pc->pc_map[field])) & pc_freemask[field];
+ while (inuse != 0) {
bit = bsfq(inuse);
idx = field * 64 + bit;
pv = &pc->pc_pventry[idx];
+ inuse &= ~(1UL << bit);
pte = vtopte(pv->pv_va);
tpte = *pte;
More information about the p4-projects
mailing list