Subject: Re: make vnodes freeable
To: YAMAMOTO Takashi <>
From: Bill Studenmund <>
List: tech-kern
Date: 07/02/2003 10:35:03
On Wed, 2 Jul 2003, YAMAMOTO Takashi wrote:

> hi,
> following patch is to make vnodes freeable.
> i.e. you can decrease kern.maxvnodes.

I have two concerns about this patch. 1) You're adding fields to struct
namecache that I don't see we need, and 2) this patch isn't going to do
what I'd want it to do.

1) Why do we need the new lists in struct namecache? (I'm not saying
there isn't a reason, I'm saying I don't see it :-) Freeing a vnode is the
exact same thing to the namecache as revoking it, which we do now. So why
do we need these new lists?

2) This patch won't do what I'd expect. If I reduce the number of vnodes,
I'd expect to get memory freed up. That won't really happen here. Yes, you
call pool_free(), but it won't free pages until the whole page is free.
i.e. until pool_free() has been called on all the vnodes in a given page.
Granted, if you lower the number of vnodes enough, you will get some freed

To really make it work right, we need to more-heavily poolify the vnode
free list. I'm not sure, though, if we can get the correct semantics (we
need to preserve the free list).

Take care,