From owner-cvs-src@FreeBSD.ORG Sat Nov 6 07:17:50 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C07A016A4CE; Sat, 6 Nov 2004 07:17:50 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B666943D58; Sat, 6 Nov 2004 07:17:50 +0000 (GMT) (envelope-from das@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id iA67HogA071580; Sat, 6 Nov 2004 07:17:50 GMT (envelope-from das@repoman.freebsd.org) Received: (from das@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iA67HoHA071579; Sat, 6 Nov 2004 07:17:50 GMT (envelope-from das) Message-Id: <200411060717.iA67HoHA071579@repoman.freebsd.org> From: David Schultz Date: Sat, 6 Nov 2004 07:17:50 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/vm swap_pager.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Nov 2004 07:17:50 -0000 das 2004-11-06 07:17:50 UTC FreeBSD src repository Modified files: sys/vm swap_pager.c Log: Fix the last known race in swapoff(), which could lead to a spurious panic: swapoff: failed to locate %d swap blocks The race occurred because putpages() can block between the time it allocates swap space and the time it updates the swap metadata to associate that space with a vm_object, so swapoff() would complain about the temporary inconsistency. I hoped to fix this by making swp_pager_getswapspace() and swp_pager_meta_build() a single atomic operation, but that proved to be inconvenient. With this change, swapoff() simply doesn't attempt to be so clever about detecting when all the pageout activity to the target device should have drained. Revision Changes Path 1.264 +14 -21 src/sys/vm/swap_pager.c