Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Nov 2000 00:53:17 -0800 (PST)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: bwillwrite() not right.
Message-ID:  <200011270853.eAR8rH229425@earth.backplane.com>
References:   <20001126232117.C8051@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
: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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011270853.eAR8rH229425>