git: 06e001a7666d - releng/14.0 - vfs cache: retire dothits and dotdothits counters

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Sat, 14 Oct 2023 01:08:44 UTC
The branch releng/14.0 has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=06e001a7666d8b8d8d2514c94a2c3026f6a6b79f

commit 06e001a7666d8b8d8d2514c94a2c3026f6a6b79f
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2023-09-23 00:08:49 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-10-14 01:06:12 +0000

    vfs cache: retire dothits and dotdothits counters
    
    They demonstrate nothing, and in case of dotdot they are not even hits.
    This is just a count of lookups with "..", which are not worth
    mentioniong.
    
    (cherry picked from commit bb124a0f611a1288c8496e3b33494f23ba929ca1)
    (cherry picked from commit 0cf6ebad73640a20fe99adacba635e2630be5d08)
    
    Approved by:    re (gjb
---
 sys/kern/vfs_cache.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 631ce856efdf..62213d94d8e2 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -530,8 +530,6 @@ STATNODE_ULONG(neg, numneg, "Number of negative cache entries");
 STATNODE_ULONG(count, numcache, "Number of cache entries");
 STATNODE_COUNTER(heldvnodes, numcachehv, "Number of namecache entries with vnodes held");
 STATNODE_COUNTER(drops, numdrops, "Number of dropped entries due to reaching the limit");
-STATNODE_COUNTER(dothits, dothits, "Number of '.' hits");
-STATNODE_COUNTER(dotdothits, dotdothits, "Number of '..' hits");
 STATNODE_COUNTER(miss, nummiss, "Number of cache misses");
 STATNODE_COUNTER(misszap, nummisszap, "Number of cache misses we do not want to cache");
 STATNODE_COUNTER(poszaps, numposzaps,
@@ -1782,7 +1780,6 @@ cache_lookup_dot(struct vnode *dvp, struct vnode **vpp, struct componentname *cn
 	int ltype;
 
 	*vpp = dvp;
-	counter_u64_add(dothits, 1);
 	SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp);
 	if (tsp != NULL)
 		timespecclear(tsp);
@@ -1827,7 +1824,6 @@ cache_lookup_dotdot(struct vnode *dvp, struct vnode **vpp, struct componentname
 		return (0);
 	}
 
-	counter_u64_add(dotdothits, 1);
 retry:
 	dvlp = VP2VNODELOCK(dvp);
 	mtx_lock(dvlp);
@@ -5131,7 +5127,6 @@ cache_fplookup_dot(struct cache_fpl *fpl)
 	fpl->tvp = fpl->dvp;
 	fpl->tvp_seqc = fpl->dvp_seqc;
 
-	counter_u64_add(dothits, 1);
 	SDT_PROBE3(vfs, namecache, lookup, hit, fpl->dvp, ".", fpl->dvp);
 
 	error = 0;
@@ -5220,7 +5215,6 @@ cache_fplookup_dotdot(struct cache_fpl *fpl)
 		return (cache_fpl_aborted(fpl));
 	}
 
-	counter_u64_add(dotdothits, 1);
 	return (0);
 }