From owner-p4-projects@FreeBSD.ORG Mon Mar 27 16:54:53 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E1D8A16A420; Mon, 27 Mar 2006 16:54:52 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B34C416A401 for ; Mon, 27 Mar 2006 16:54:52 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CCB943D4C for ; Mon, 27 Mar 2006 16:54:52 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k2RGsqQo032781 for ; Mon, 27 Mar 2006 16:54:52 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k2RGsqiW032778 for perforce@freebsd.org; Mon, 27 Mar 2006 16:54:52 GMT (envelope-from peter@freebsd.org) Date: Mon, 27 Mar 2006 16:54:52 GMT Message-Id: <200603271654.k2RGsqiW032778@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 94115 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2006 16:54:53 -0000 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;