Subject: Re: Limitations of current buffer cache on 32-bit ports
To: Chuck Silvers <chuq@chuq.com>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 07/24/2002 00:33:06
On Tue, Jul 23, 2002 at 09:10:52PM -0700, Chuck Silvers wrote:
> On Tue, Jul 23, 2002 at 11:25:58AM -0400, Thor Lancelot Simon wrote:
> > On Tue, Jul 23, 2002 at 12:03:57AM -0700, Chuck Silvers wrote:
> > > 
> > > the BSD 4.4 buffer cache is the only one I know of that has a fixed size
> > > for all buffers, that's why this isn't so much of a problem in other
> > > systems.
> > 
> > The rest of your message seems to make sense, but I don't really buy this
> > part.  Even if the buffers have variable virtual size, they can't use less
> > virtual than physical space -- and to cache a 32K filesystem block, you
> > need 32K of space, right?
> 
> that's not what I meant, let me try again.
> 
> the BSD 4.4 buffer cache uses MAXBSIZE bytes of virtual space for
> each buffer regardless of how much data that buffer contains.
> other systems use only as much virtual space for a given buffer as is
> required for the data in the buffer.  some round each buffer up to a
> page-aligned virtual size, others allow multiple (small) buffers to
> share a virtual (and physical) page.  since other systems are much more
> efficient in their use of virtual space for the buffer cache,
> the virtual space constraint isn't as much of a problem for them.

Okay, but if we continue to cache directories and other metadata by caching
the filesystem blocks they came from, on modern disks we will continue to
need on the order of 32K per.  Not ideal, no?

Thor