From 4ab2a9a022ed105de65de11d3c8d72f0c3a480e7 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 9 Mar 2009 19:04:53 +0000 Subject: [PATCH] Move the debug.hashstat sysctl tree under DIAGNOSTIC. I measured the debug.hashstat.rawnchash sysctl in particular as taking 7 milliseconds on a 3GHz Intel Xeon (4x2) running 7.1. It accounted for almost a quarter of the total runtime of 'sysctl -a'. It also performs lots of copyout's while holding the namecache lock (this does not attempt to fix that). MFC after: 2 weeks --- sys/kern/vfs_cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 3c32808b4b7..cec1e338583 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -184,6 +184,7 @@ static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries"); */ #define NCF_WHITE 1 +#ifdef DIAGNOSTIC /* * Grab an atomic snapshot of the name cache hash chain lengths */ @@ -268,6 +269,7 @@ sysctl_debug_hashstat_nchash(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE_INT|CTLFLAG_RD| CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_nchash, "I", "nchash chain lengths"); +#endif /* * cache_zap(): -- 2.45.2