From owner-svn-src-all@FreeBSD.ORG Sat Jun 13 18:35:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADA041065676; Sat, 13 Jun 2009 18:35:29 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C6F08FC15; Sat, 13 Jun 2009 18:35:29 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5DIZTmi021455; Sat, 13 Jun 2009 18:35:29 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5DIZT0s021454; Sat, 13 Jun 2009 18:35:29 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200906131835.n5DIZT0s021454@svn.freebsd.org> From: Alan Cox Date: Sat, 13 Jun 2009 18:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194123 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2009 18:35:30 -0000 Author: alc Date: Sat Jun 13 18:35:29 2009 New Revision: 194123 URL: http://svn.freebsd.org/changeset/base/194123 Log: Correct the method of waking the page daemon when the number of allocated pv entries surpasses the high water mark. The problem was that the page daemon would only be awakened the first time that the high water mark was surpassed. (The variable "pagedaemon_waken" is a non-working vestige of FreeBSD 4.x, in which it was external and reset by the page daemon whenever it ran. This reset allowed subsequent wakeups by the pv entry allocator.) Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Sat Jun 13 17:09:31 2009 (r194122) +++ head/sys/powerpc/booke/pmap.c Sat Jun 13 18:35:29 2009 (r194123) @@ -156,8 +156,6 @@ static void mmu_booke_enter_locked(mmu_t unsigned int kptbl_min; /* Index of the first kernel ptbl. */ unsigned int kernel_ptbls; /* Number of KVA ptbls. */ -static int pagedaemon_waken; - /* * If user pmap is processed with mmu_booke_remove and the resident count * drops to 0, there are no more pages to remove, so we need not continue. @@ -712,11 +710,8 @@ pv_alloc(void) pv_entry_t pv; pv_entry_count++; - if ((pv_entry_count > pv_entry_high_water) && - (pagedaemon_waken == 0)) { - pagedaemon_waken = 1; - wakeup(&vm_pages_needed); - } + if (pv_entry_count > pv_entry_high_water) + pagedaemon_wakeup(); pv = uma_zalloc(pvzone, M_NOWAIT); return (pv);