Subject: Re: locked buffer tracking
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 09/05/2003 09:46:56
On Fri, 5 Sep 2003, YAMAMOTO Takashi wrote:

> hi,
>
> LFS keeps track of total size of B_LOCKED buffer (locked_queue_bytes)
> so that it doesn't take too much buffer cache pages.
> however, currently it loses when getblk() resizes one of them.
>
> while the problem will be fixed with following patch,
> i don't think it's so optimal.

I agree. KASSERT() is used to test assertions that _should_ be true, so
much so that we can/should panic if they are false.  In this case it is
common for the assertion to be false. That seems like a bad candidate for
a KASSERT().

> i think that B_LOCKED buffer count/bytes tracking and buffer pinning codes
> should be moved to some filesystem-independent place from the inside of LFS.
>
> any comments/ideas?

Unfortuantely I don't know LFS well enough to say. But what is wanting to
grow the block, and why can't the byte counting be updated to cope? I
think that's the best idea.

Take care,

Bill