svn commit: r189593 - head/sys/kern
John Baldwin
jhb at FreeBSD.org
Mon Mar 9 12:04:55 PDT 2009
Author: jhb
Date: Mon Mar 9 19:04:53 2009
New Revision: 189593
URL: http://svn.freebsd.org/changeset/base/189593
Log:
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
Modified:
head/sys/kern/vfs_cache.c
Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c Mon Mar 9 17:53:05 2009 (r189592)
+++ head/sys/kern/vfs_cache.c Mon Mar 9 19:04:53 2009 (r189593)
@@ -184,6 +184,7 @@ static MALLOC_DEFINE(M_VFSCACHE, "vfscac
*/
#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_HAND
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():
More information about the svn-src-all
mailing list