Subject: Re: The buffer cache and directory blocks
To: None <>
From: John Kohl <>
List: tech-kern
Date: 01/11/2004 21:09:42
>>>>> "Thor" == Thor Lancelot Simon <> writes:

Thor> Darren Jewell suggests that a possible problem arises when entries
Thor> from the same directory block are read in sequentially; if the
Thor> block does not remain in cache, it will be read in over and over
Thor> again.  Two approaches seem possible:

Thor> 1) Preemptively enter all directory entries from a given block into the
Thor>    namei cache when reading the block in; then put the directory block
Thor>    immediately on the AGE list for priority reuse.  This is vaguely like
Thor>    the ReaddirPlus RPC in NFS (which we do not turn on by default).

Doesn't that require you to read/activate all the inodes referenced by
the names in the directory (so that the namei cache can translate the
names to vnodes, right)?  Performance suckage likely...

John Kohl <>
Hacking on NetBSD/i386 on occasion.  See also <>.