From owner-cvs-src@FreeBSD.ORG Thu Nov 18 08:44:10 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 2F0B016A4CE; Thu, 18 Nov 2004 08:44:10 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B74743D1F; Thu, 18 Nov 2004 08:44:10 +0000 (GMT) (envelope-from jeff@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 iAI8i9US033767; Thu, 18 Nov 2004 08:44:10 GMT (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iAI8i9JC033766; Thu, 18 Nov 2004 08:44:09 GMT (envelope-from jeff) Message-Id: <200411180844.iAI8i9JC033766@repoman.freebsd.org> From: Jeff Roberson Date: Thu, 18 Nov 2004 08:44:09 +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/sys buf.h src/sys/kern vfs_bio.c src/sys/nfsclient nfs_bio.c src/sys/ufs/ffs ffs_vnops.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: Thu, 18 Nov 2004 08:44:10 -0000 jeff 2004-11-18 08:44:09 UTC FreeBSD src repository Modified files: sys/sys buf.h sys/kern vfs_bio.c sys/nfsclient nfs_bio.c sys/ufs/ffs ffs_vnops.c Log: - Eliminate the acquisition and release of the bqlock in bremfree() by setting the B_REMFREE flag in the buf. This is done to prevent lock order reversals with code that must call bremfree() with a local lock held. This also reduces overhead by removing two lock operations per buf for fsync() and similar. - Check for the B_REMFREE flag in brelse() and bqrelse() after the bqlock has been acquired so that we may remove ourself from the free-list. - Provide a bremfreef() function to immediately remove a buf from a free-list for use only by NFS. This is done because the nfsclient code overloads the b_freelist queue for its own async. io queue. - Simplify the numfreebuffers accounting by removing a switch statement that executed the same code in every possible case. - getnewbuf() can encounter locked bufs on free-lists once Giant is removed. Remove a panic associated with this condition and delay asserts that inspect the buf until after it is locked. Reviewed by: phk Sponsored by: Isilon Systems, Inc. Revision Changes Path 1.469 +66 -38 src/sys/kern/vfs_bio.c 1.140 +2 -0 src/sys/nfsclient/nfs_bio.c 1.181 +2 -1 src/sys/sys/buf.h 1.142 +2 -1 src/sys/ufs/ffs/ffs_vnops.c