Subject: Re: buffer starvation & the vnd driver
To: R. C. Dowdeswell <elric@imrryr.org>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-kern
Date: 09/02/1999 17:08:14
On Thu, 2 Sep 1999, R. C. Dowdeswell wrote:
>
> On 936231518 seconds since the Beginning of the UNIX epoch
> Bill Studenmund wrote:
> >
>
> >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.
>
> Well, I'll chime in here with the basic symptoms. (I don't have
> the machine with me, but...) It hangs. ddb tells me that
> msdosfs_bmap() calls getblk() calls bawrite() to write a block out,
> which calls vndstrategy() which calls msdosfs_bmap() which calls
> getblk() which hangs waiting for the previous getblk() to finish.
> And then all disk activity stops.
Ahhhhh... That's a different problem than what I understood was going on.
[note: getblk() shoudn't be calling bawrite()]
So what happens then is that we call getblk() on a buffer, and do
SET(bp->b_flags, B_BUSY). In the process of doing the msdosfs_bmap(), we
end up calling getblk on this buffer AGAIN, see B_BUSY set, and sleep on
ourselves.
Sounds like much more of an msdosfs bug than I understood it to be, though
we should find an FS-I solution.
So basically if we want to read in a FAT page, we must write out a page
which won't need that page to write.
I see no easy solution.
Thoughts?
Take care,
Bill