Subject: Re: namei caching of newly created files?
To: Bill Studenmund <>
From: Daniel Carosone <>
List: tech-kern
Date: 01/20/2005 14:24:33
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 19, 2005 at 05:47:31PM -0800, Bill Studenmund wrote:
> To further complicate things, we also use that initial search to look for=
> empty entries. If we don't find the name, we will use one empty entry to=
> store the to-be-created inode. So even if we used an in-core tree (or has=
> table) to tell if the file doesn't exist, we still need to know where to=
> create it in the dir.

This is hurting, mostly, because it's being done over and over again
all the way to the end of the dir. As the simplest possible change,
before looking at more complex solutions, having done the search to
the end once and found no free slots, we could remember that fact.  We
would reset the flag on deleting an entry and making a space, or
perhaps after doing so several times.

With a complete in-core cache (as discussed) of the names, for the
existence test, and this flag set, we just append new entries to the
end of the dir quickly.  That would address the needs of this
benchmark, leaving room for discussion and design of smarter rewrites
or optimisations using some of the other ideas proposed.


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.0 (NetBSD)