Re: namei caching of newly created files?
Daniel Carosone <[email protected]> Thu, 20 Jan 2005 14:24:33 +1100
| Newsgroups | gmane.os.netbsd.devel.kernel,gmane.os.netbsd.devel.performance |
|---|---|
| Message-ID | <[email protected]> |
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 hash > 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. -- Dan.
signature.asc
(application/pgp-signature, 186 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (NetBSD) iD8DBQFB7yRxEAVxvV4N66cRAnSMAKCCW9dkTeHJt3ld0fenYf1nZkT9GgCgo3Ng EyceU36RPunI8wdIBRkp8Ls= =326Z -----END PGP SIGNATURE-----