From owner-cvs-src Tue Mar 4 13:35:31 2003 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 7B4F237B405; Tue, 4 Mar 2003 13:35:29 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1697F43FCB; Tue, 4 Mar 2003 13:35:29 -0800 (PST) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h24LZS0U064527; Tue, 4 Mar 2003 13:35:28 -0800 (PST) (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h24LZSZB064526; Tue, 4 Mar 2003 13:35:28 -0800 (PST) Message-Id: <200303042135.h24LZSZB064526@repoman.freebsd.org> From: Jeff Roberson Date: Tue, 4 Mar 2003 13:35:28 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern vfs_cluster.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jeff 2003/03/04 13:35:28 PST FreeBSD src repository Modified files: sys/kern vfs_cluster.c Log: - Hold the buf lock while manipulating and inspecting its fields. - Use gbincore() and not incore() so that we can drop the vnode interlock as we acquire the buflock. - Use GB_LOCK_NOWAIT when getting bufs for read ahead clusters so that we don't block on locked bufs. - Convert a while loop to a howmany() that will most likely be faster on modern processors. There is another while loop divide that was left near by because it is operating on a 64bit int and is most likely faster. - Cleanup the cluster_read() code a little to get rid of a goto and make the logic clearer. Tested on: x86, alpha Tested by: Steve Kargl Reviewd by: arch Revision Changes Path 1.131 +70 -56 src/sys/kern/vfs_cluster.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message