: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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message