Date: Mon, 27 Mar 2006 16:54:52 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94115 for review Message-ID: <200603271654.k2RGsqiW032778@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94115 Change 94115 by peter@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603271654.k2RGsqiW032778>