Subject: Re: Limitations of current buffer cache on 32-bit ports
To: Thor Lancelot Simon <tls@rek.tjls.com>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 07/23/2002 21:10:52
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.

-Chuck