From owner-cvs-sys Thu Mar 9 12:27:24 1995 Return-Path: cvs-sys-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA21379 for cvs-sys-outgoing; Thu, 9 Mar 1995 12:27:24 -0800 Received: (from phk@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA21369; Thu, 9 Mar 1995 12:27:23 -0800 Date: Thu, 9 Mar 1995 12:27:23 -0800 From: Poul-Henning Kamp Message-Id: <199503092027.MAA21369@freefall.cdrom.com> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/sys namei.h Sender: cvs-sys-owner@freebsd.org Precedence: bulk phk 95/03/09 12:27:22 Modified: sys/sys namei.h Log: Clean up and improve the namecache. 1. We always keep one 16th of the vnodes on the freelist, so that the namecache doesn't get trashed. It used to be that it wasn't a problem, but the only vnodes getting released these days are directories and things which Clean up and improve the namecache. 1. We always keep one 16th of the vnodes on the freelist, so that the namecache doesn't get trashed. It used to be that it wasn't a problem, but the only vnodes getting released these days are directories and things which gets forced out of the VM/cache. The latter is not numerous enough to keep the pool of vnodes needed for the namecache sufficiently big. 2. Purge invalid entries in the namecache as soon as we notice them. This avoids a stale entry pushing out a valid entry on the LRU list. 3. Speed up the lookup in the namecache by avoid a special case branch. 4. Make the cache purge routines do the thing they're supposed to, and in a decently efficient manner. 5. Make the size of the namecache follow the number of vnodes, so that we can always point to all the vnodes we have in core. 6. Readability has gone way up. 7. Added a "options NCH_STATISTICS" feature that will gather more detailed statistics on the performance of the namecache. Reviewed by: davidg