Subject: Re: vnode locking procedure change to suport stacked fs's.
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 06/01/1999 16:37:18
Jason Thorpe writes:
> On Tue, 1 Jun 1999 11:38:36 -0700 (PDT) 
>  Bill Studenmund <wrstuden@nas.nasa.gov> wrote:
> 
>  > My thought was to just have getnewvnode() ignore the previous contents of
>  > v_vnlock (the pointer)  and initialize it to &vp->v_lock (the struct
>  > lock). 
> 
> ...along these lines... is it possible for vnodes which are still
> referenced to actually be on the free list?  If not, then I'd like
> to nuke the free list completely, and pool_put() vnodes when they're
> no longer used (so that free vnode pool pages can be reclaimed if
> necessary).
> 
>         -- Jason R. Thorpe <thorpej@nas.nasa.gov>


the vnode "free list" is sortof a misnomer... vnodes on this list are
only free in the sense that there are no file descriptor or mmap references
to them.  however, these vnodes still contain cached data (and are the
anchors for buffer- and page-cache data) which you'd like to keep in memory.

also, the current DNLC implementation (vfs_cache.c) assumes that vnodes
are never freed once allocated, so you'd have to change that if you want
to free vnodes.  (this is an example of Type-Stable Memory, for the
theory weenies amongst us...)

-Chuck