Date: Mon, 9 Mar 2009 19:04:54 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r189593 - head/sys/kern Message-ID: <200903091904.n29J4svr034941@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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():
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903091904.n29J4svr034941>