From owner-freebsd-hackers Mon Nov 27 0:53:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (placeholder-dcat-1076843399.broadbandoffice.net [64.47.83.135]) by hub.freebsd.org (Postfix) with ESMTP id 9745737B479 for ; Mon, 27 Nov 2000 00:53:32 -0800 (PST) Received: (from dillon@localhost) by earth.backplane.com (8.11.1/8.9.3) id eAR8rH229425; Mon, 27 Nov 2000 00:53:17 -0800 (PST) (envelope-from dillon) Date: Mon, 27 Nov 2000 00:53:17 -0800 (PST) From: Matt Dillon Message-Id: <200011270853.eAR8rH229425@earth.backplane.com> To: Alfred Perlstein Cc: hackers@FreeBSD.ORG Subject: Re: bwillwrite() not right. References: <20001126232117.C8051@fw.wintelcom.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :bwillwrite() is called in kern/sys_generic.c:dofilewrite() : :bwillwrite() is meant as a quick stop before doing any vnode :ops to flush dirty buffers to prevent a deadlock. : :However: :1) afaik only VNODES have backing buffers, so stalling socket/pipes : doesn't gain us anything :2) writev() doesn't call bwillwrite() : :shouldn't the code be changed like so: Hmm.. Well, your suggestion is certainly better then what it is doing now. bwillwrite() is somewhat of a hack, I just haven't gotten around to replacing it with something better. What it is approximating is an attempt to block on low-memory prior to locking a vnode so we do not wind up blocking on low-memory later on when the lock is being held (which could prevent the pageout daemon from paging pages associated with that vnode out, thus causing a deadlock). When you feel comfortable with it in your own testing, go ahead and commit it to -current. But give it at least a good week's worth of testing (or longer) before MFCing it to -stable. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message