Subject: Re: buffer starvation & the vnd driver
To: Bill Studenmund <>
From: Chuck Silvers <>
List: tech-kern
Date: 09/02/1999 22:21:31
On Thu, Sep 02, 1999 at 06:29:56PM -0700, Bill Studenmund wrote:
> > >[note: getblk() shoudn't be calling bawrite()]
> > 
> > Well, getblk() calls allocbuf() which calls getnewbuf() which starts
> > delayed writes with bawrite().  (Just because it is no longer late
> > and I just had a look at the code.)
> This problem would be fixed with the low water mark stuff Jason mentioned.
> We'd then be triggering these writes before we were out of buffers to use
> to write them. :-)

a subtler problem is that a single getblk() can trigger an arbitrary
degree of recursion thru the vnd driver, which can lead to kernel stack
overflow if you're sufficiently unlucky.  the freebsd guys discovered
and fixed this some months ago.  I don't recall what the fix involved.