Subject: Re: Configuring a large buffer cache
To: None <>
From: Alasdair Baird <>
List: port-i386
Date: 11/25/1998 01:35:56
> > As each buffer header requires a full 64k of VA space, [...]
> Can someone please spend a couple of minutes explaining why this
> is so?

Buffer headers are a collective resource, shared between all active
file-systems, that are used to describe what file-system blocks are
in the cache.  File-system blocks can be of various sizes upto a
maximum (at least on the i386) of 64k.

Memory is allocated to the buffer cache at boot time and a set of
buffer headers are allocated too; the buffer cache pages are doled
out between the headers, but it need not be the case that all headers
have their full complement of memory.  In fact the cache pages are
shuffled between the headers during the lifetime of the system as
file-system activity requires.  However, any buffer header may
potentially be associated with any size of file-system block that is
in use.  As a result, each header is given a full MAXBSIZE of VA
space, allowing pages to be pinged between headers with ease.

This may make it sound that if you don't have anything more than an
8k block size then MAXBSIZE need not be more than 8k.  Perhaps true,
but the file-system may try to do multi-block read-ahead, coalescing
several 8k requests into a larger request.  As the limit on such
coalescing is MAXBSIZE, dropping MAXBSIZE unnecessarily can affect