Subject: buffer starvation & the vnd driver
To: None <tech-kern@netbsd.org>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-kern
Date: 09/01/1999 17:18:38
Roland Dowdeswell and I have been talking about problems he's been seeing
with vnd devices on msdos fs's, and I'm wondering what the best solution
is.
As I understand it, the idea is to let people do NetBSD things on a
computer which only has msdos filesystems. We create a file on the msdos
filesystem, and build an ffs on top of that using the vnd driver.
The problem manifests itself after a period of use of the fs over the vnd.
I've forgotten if the system just dies, or panics. But it's reproducable
and related to activity. It dies trying to flush dirty pages.
As best we can tell, the problem is that msdosfs needs to read in buffers
in order to satisfy the VOP_BMAP call in vndstrategy (in order to say
which blocks relate to the file, it has to read file system data, like the
FAT). The problem is that there aren't enough free pages available to read
in the file layout info in order to write the dirty blocks in memory.
I think it's another manifestation of the starvation issue which arrises
when you nfs mount a directory from your own system - not enough free
memory to service a request which would free up memory.
One suggestion Jason made is to set a low-water mark, and whenever we
allocate buffers below that point, we go through and schedule writes for
delayed-write buffers.
Thoughts?
Take care,
Bill