From 46c320bab83e15a3decc60968e96f8f08c171fbd Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Wed, 24 Sep 1997 15:54:10 +0000 Subject: [PATCH] Add one more counter so we can truly find out how good our name cache is. If we don't find something and don't what to have found something, it's actually a success. --- sys/kern/vfs_cache.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 08ba8f272713..71db0b0e7091 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)vfs_cache.c 8.5 (Berkeley) 3/22/95 - * $Id: vfs_cache.c,v 1.31 1997/09/04 08:24:44 phk Exp $ + * $Id: vfs_cache.c,v 1.32 1997/09/24 07:46:52 phk Exp $ */ #include @@ -100,6 +100,7 @@ static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits); static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits); static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks); static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss); +static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap); static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps); static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits); static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps); @@ -192,7 +193,11 @@ cache_lookup(dvp, vpp, cnp) /* We failed to find an entry */ if (ncp == 0) { - nummiss++; + if ((cnp->cn_flags & MAKEENTRY) == 0) { + nummisszap++; + } else { + nummiss++; + } nchstats.ncs_miss++; return (0); }