From owner-cvs-all Thu Mar 11 18:25:17 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id E186514F55; Thu, 11 Mar 1999 18:25:12 -0800 (PST) (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id SAA57583; Thu, 11 Mar 1999 18:24:59 -0800 (PST) (envelope-from julian@FreeBSD.org) Message-Id: <199903120224.SAA57583@freefall.freebsd.org> From: Julian Elischer Date: Thu, 11 Mar 1999 18:24:59 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys buf.h proc.h src/sys/kern vfs_bio.c vfs_cluster.c vfs_subr.c src/sys/nfs nfs_bio.c nfs_vnops.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk julian 1999/03/11 18:24:59 PST Modified files: sys/sys buf.h proc.h sys/kern vfs_bio.c vfs_cluster.c vfs_subr.c sys/nfs nfs_bio.c nfs_vnops.c Log: Reviewed by: Many at differnt times in differnt parts, including alan, john, me, luoqi, and kirk Submitted by: Matt Dillon This change implements a relatively sophisticated fix to getnewbuf(). There were two problems with getnewbuf(). First, the writerecursion can lead to a system stack overflow when you have NFS and/or VN devices in the system. Second, the free/dirty buffer accounting was completely broken. Not only did the nfs routines blow it trying to manually account for the buffer state, but the accounting that was done did not work well with the purpose of their existance: figuring out when getnewbuf() needs to sleep. The meat of the change is to kern/vfs_bio.c. The remaining diffs are all minor except for NFS, which includes both the fixes for bp interaction AND fixes for a 'biodone(): buffer already done' lockup. Sys/buf.h also contains a chaining structure which is not used by this patchset but is used by other patches that are coming soon. This patch deliniated by tags PRE_MAT_GETBUF and POST_MAT_GETBUF. (sorry for the missing T matt) Revision Changes Path 1.65 +9 -6 src/sys/sys/buf.h 1.75 +4 -3 src/sys/sys/proc.h 1.202 +665 -381 src/sys/kern/vfs_bio.c 1.80 +3 -3 src/sys/kern/vfs_cluster.c 1.189 +23 -12 src/sys/kern/vfs_subr.c 1.67 +36 -21 src/sys/nfs/nfs_bio.c 1.124 +51 -30 src/sys/nfs/nfs_vnops.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message