From owner-cvs-all@FreeBSD.ORG Wed Feb 23 16:45:13 2005 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 8377516A4CF; Wed, 23 Feb 2005 16:45:13 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63BF043D49; Wed, 23 Feb 2005 16:45:13 +0000 (GMT) (envelope-from alc@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 j1NGjDN5065555; Wed, 23 Feb 2005 16:45:13 GMT (envelope-from alc@repoman.freebsd.org) Received: (from alc@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1NGjDWa065554; Wed, 23 Feb 2005 16:45:13 GMT (envelope-from alc) Message-Id: <200502231645.j1NGjDWa065554@repoman.freebsd.org> From: Alan Cox Date: Wed, 23 Feb 2005 16:45:13 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Subject: cvs commit: src/sys/vm vm_object.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: Wed, 23 Feb 2005 16:45:13 -0000 alc 2005-02-23 16:45:13 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sys/vm vm_object.c Log: MFC revisions 1.333 and 1.334 Eliminate unnecessary calls to vm_page_busy(). MFC revision 1.340 Move the acquisition and release of the page queues lock outside of a loop in vm_object_split() to avoid repeated acquisition and release. MFC revision 1.343 Consider three objects, O, BO, and BBO, where BO is O's backing object and BBO is BO's backing object. Now, suppose that O and BO are being collapsed. Furthermore, suppose that BO has been marked dead (OBJ_DEAD) by vm_object_backing_scan() and that either vm_object_backing_scan() has been forced to sleep due to encountering a busy page or vm_object_collapse() has been forced to sleep due to memory allocation in the swap pager. If vm_object_deallocate() is then called on BBO and BO is BBO's only shadow object, vm_object_deallocate() will collapse BO and BBO. In doing so, it adds a necessary temporary reference to BO. If this collapse also sleeps and the prior collapse resumes first, the temporary reference will cause vm_object_collapse to panic with the message "backing_object %p was somehow re-referenced during collapse!" Resolve this race by changing vm_object_deallocate() such that it doesn't collapse BO and BBO if BO is marked dead. Once O and BO are collapsed, vm_object_collapse() will attempt to collapse O and BBO. So, vm_object_deallocate() on BBO need do nothing. MFC revision 1.345 Update the text of an assertion to reflect changes made in revision 1.148. Eliminate an unnecessary, temporary increment of the backing object's reference count in vm_object_qcollapse(). Revision Changes Path 1.331.2.3 +12 -12 src/sys/vm/vm_object.c