From owner-cvs-all Sat Sep 8 13: 2:41 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 66EC937B407; Sat, 8 Sep 2001 13:02:33 -0700 (PDT) Received: (from dillon@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f88K2XF42571; Sat, 8 Sep 2001 13:02:33 -0700 (PDT) (envelope-from dillon) Message-Id: <200109082002.f88K2XF42571@freefall.freebsd.org> From: Matt Dillon Date: Sat, 8 Sep 2001 13:02:33 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern imgact_aout.c imgact_elf.c kern_sig.c vfs_vnops.c src/sys/compat/pecoff imgact_pecoff.c src/sys/sys vnode.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG dillon 2001/09/08 13:02:33 PDT Modified files: sys/kern imgact_aout.c imgact_elf.c kern_sig.c vfs_vnops.c sys/compat/pecoff imgact_pecoff.c sys/sys vnode.h Log: This brings in a Yahoo coredump patch from Paul, with additional mods by me (addition of vn_rdwr_inchunks). The problem Yahoo is solving is that if you have large process images core dumping, or you have a large number of forked processes all core dumping at the same time, the original coredump code would leave the vnode locked throughout. This can cause the directory vnode to get locked up, which can cause the parent directory vnode to get locked up, and so on all the way to the root node, locking the entire machine up for extremely long periods of time. This patch solves the problem in two ways. First it uses an advisory non-blocking lock to abort multiple processes trying to core to the same file. Second (my contribution) it chunks up the writes and uses bwillwrite() to avoid holding the vnode locked while blocking in the buffer cache. Submitted by: ps Reviewed by: dillon MFC after: 2 weeks Revision Changes Path 1.71 +5 -5 src/sys/kern/imgact_aout.c 1.103 +6 -5 src/sys/kern/imgact_elf.c 1.132 +20 -5 src/sys/kern/kern_sig.c 1.119 +40 -1 src/sys/kern/vfs_vnops.c 1.9 +5 -5 src/sys/compat/pecoff/imgact_pecoff.c 1.155 +4 -1 src/sys/sys/vnode.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message