From owner-p4-projects@FreeBSD.ORG Mon Sep 29 17:31:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7614016A4C3; Mon, 29 Sep 2003 17:31:11 -0700 (PDT) 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 4998316A4C0 for ; Mon, 29 Sep 2003 17:31:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 683394400F for ; Mon, 29 Sep 2003 17:31:10 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8U0VAXJ023824 for ; Mon, 29 Sep 2003 17:31:10 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8U0V9hY023821 for perforce@freebsd.org; Mon, 29 Sep 2003 17:31:09 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Mon, 29 Sep 2003 17:31:09 -0700 (PDT) Message-Id: <200309300031.h8U0V9hY023821@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 Subject: PERFORCE change 38819 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2003 00:31:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=38819 Change 38819 by peter@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);