From owner-p4-projects@FreeBSD.ORG Wed Apr 23 16:52:05 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6855837B404; Wed, 23 Apr 2003 16:52:04 -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 A7CE837B428 for ; Wed, 23 Apr 2003 16:52:03 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F17A43F85 for ; Wed, 23 Apr 2003 16:52:03 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3NNq30U095566 for ; Wed, 23 Apr 2003 16:52:03 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3NNq2nI095553 for perforce@freebsd.org; Wed, 23 Apr 2003 16:52:02 -0700 (PDT) Date: Wed, 23 Apr 2003 16:52:02 -0700 (PDT) Message-Id: <200304232352.h3NNq2nI095553@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 29569 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: Wed, 23 Apr 2003 23:52:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=29569 Change 29569 by peter@peter_daintree on 2003/04/23 16:51:23 free the PDP and PML4 pages to stop the leak Affected files ... .. //depot/projects/hammer/sys/x86_64/x86_64/pmap.c#24 edit Differences ... ==== //depot/projects/hammer/sys/x86_64/x86_64/pmap.c#24 (text+ko) ==== @@ -1247,15 +1247,21 @@ vm_page_lock_queues(); for (i = 0; i < NPGPTD; i++) { m = TAILQ_FIRST(&object->memq); -#ifdef PAE KASSERT(VM_PAGE_TO_PHYS(m) == (pmap->pm_pdp[i] & PG_FRAME), ("pmap_release: got wrong ptd page")); -#endif m->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_busy(m); vm_page_free_zero(m); } + /* now free pdp and pml4 */ + for (i = 0; i < 2; i++) { + m = TAILQ_FIRST(&object->memq); + m->wire_count--; + atomic_subtract_int(&cnt.v_wire_count, 1); + vm_page_busy(m); + vm_page_free(m); + } KASSERT(TAILQ_EMPTY(&object->memq), ("pmap_release: leaking page table pages")); vm_page_unlock_queues();