From owner-cvs-all@FreeBSD.ORG Thu Jan 8 12:48:31 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88C2B16A4CE; Thu, 8 Jan 2004 12:48:31 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9331D43D4C; Thu, 8 Jan 2004 12:48:26 -0800 (PST) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i08KmQ0B010756; Thu, 8 Jan 2004 12:48:26 -0800 (PST) (envelope-from alc@repoman.freebsd.org) Received: (from alc@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i08KmQ7t010755; Thu, 8 Jan 2004 12:48:26 -0800 (PST) (envelope-from alc) Message-Id: <200401082048.i08KmQ7t010755@repoman.freebsd.org> From: Alan Cox Date: Thu, 8 Jan 2004 12:48:26 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/vm vm_contig.c vm_page.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2004 20:48:31 -0000 alc 2004/01/08 12:48:26 PST FreeBSD src repository Modified files: sys/vm vm_contig.c vm_page.c Log: - Enable recursive acquisition of the mutex synchronizing access to the free pages queue. This is presently needed by contigmalloc1(). - Move a sanity check against attempted double allocation of two pages to the same vm object offset from vm_page_alloc() to vm_page_insert(). This provides better protection because double allocation could occur through a direct call to vm_page_insert(), such as that by vm_page_rename(). - Modify contigmalloc1() to hold the mutex synchronizing access to the free pages queue while it scans vm_page_array in search of free pages. - Correct a potential leak of pages by contigmalloc1() that I introduced in revision 1.20: We must convert all cache queue pages to free pages before we begin removing free pages from the free queue. Otherwise, if we have to restart the scan because we are unable to acquire the vm object lock that is necessary to convert a cache queue page to a free page, we leak those free pages already removed from the free queue. Revision Changes Path 1.27 +6 -2 src/sys/vm/vm_contig.c 1.274 +7 -6 src/sys/vm/vm_page.c