Subject: Re: bugs/features and using UVM for directory buffers
To: Chuck Silvers <chuq@chuq.com>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 01/11/2006 01:16:00
On Tue, Jan 10, 2006 at 10:02:24PM -0800, Chuck Silvers wrote:
> 
> actually, the buffer cache system has two free lists, one called "LRU"
> and the other called "AGE".  (both named being pretty poor, I'd say.)
> there's a third list too, the "LOCKED" list, which contains buffers
> that are also "free" but will not be reused or flushed by the buffer
> cache system.  this is somewhat similar to "wired" pages in the VM system
> (though wired pages can still be written to backing store).

As you may recall, I made an abortive effort just after phk committed his
dynamically-allocated metadata cache code to kill the AGE list.  Eventually,
I concluded that we needed _some_ kind of delayed-free list to hold buffers
that were to be freed upon return from interrupt context; and that since the
traditional semantics for the AGE list were "free this first; then whatever
else looks like a good candidate for freeing" little harm was done by using
the AGE list to fill that role.

The use of the AGE list is well documented, as are some of the other aspects
of the metadata cache system that seem to be causing confusion here.  I have
to wonder if it would be unreasonable to ask that before developers go
rampaging around in this part of the kernel, they at least read the simple,
well-written, rather comprehensive sources that cover the topic, e.g.
_The Design and Implementation of the 4.4BSD Unix Operating System_?

Thor