Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2001 22:34:19 -0300 (BRST)
From:      Rik van Riel <riel@conectiva.com.br>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        David Xu <bsddiy@21cn.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: vm balance
Message-ID:  <Pine.LNX.4.21.0104102231300.25737-100000@imladris.rielhome.conectiva>
In-Reply-To: <200104102321.f3ANLP994366@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 10 Apr 2001, Matt Dillon wrote:

> :I'm curious about the other things though ... FreeBSD still seems
> :to have the early 90's abstraction layer from Mach and the vnode
> :cache doesn't seem to grow and shrink dynamically (which can be a
> :big win for systems with lots of metadata activity).

>     Well, the approach we take is that of a two-layered cache.
>     The vnode, dentry (namei for FreeBSD), and inode caches
>     in FreeBSD are essentially throw-away caches of data
>     represented in an internal form.  The VM PAGE cache 'backs'
>     these caches loosely by caching the physical on-disk representation
>     of inodes, and directory entries (see note 1 at bottom).
> 
>     This means that even though we limit the number of the namei
>     and inode structures we keep around in the kernel, the data
>     required to reconstitute those structures is 'likely' to
>     still be in the VM PAGE cache, allowing us to pretty much
>     throw away those structures on a whim.  The only cost is that
>     we have to go through a filesystem op (possibly not requiring I/O)
>     to reconstitute the internal structure.

Which is ok if there isn't too much activity with these data
structures, but I'm not sure if it works when you have a lot
of metadata activity (though I'm not sure in what kind of
workload you'd see this).

Also, if you have a lot of metadata activity, you'll essentially
double the memory requirements, since you'll have the stuff cached
in both the internal structures and in the VM PAGE cache. I'm not
sure how much of a hit this would be, though, if the internal
structures are limited to a small enough size...

regards,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

		http://www.surriel.com/
http://www.conectiva.com/	http://distro.conectiva.com.br/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0104102231300.25737-100000>