From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 06:09:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 850031065674; Sun, 14 Nov 2010 06:09:50 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 723328FC0A; Sun, 14 Nov 2010 06:09:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE69oaZ072196; Sun, 14 Nov 2010 06:09:50 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE69oqd072190; Sun, 14 Nov 2010 06:09:50 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140609.oAE69oqd072190@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 06:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215281 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 06:09:50 -0000 Author: brucec Date: Sun Nov 14 06:09:50 2010 New Revision: 215281 URL: http://svn.freebsd.org/changeset/base/215281 Log: Add some descriptions to sys/kern sysctls. PR: kern/148710 Tested by: Chip Camden MFC after: 1 week Modified: head/sys/kern/kern_proc.c head/sys/kern/kern_tc.c head/sys/kern/subr_clock.c head/sys/kern/sysv_sem.c head/sys/kern/vfs_cache.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/kern_proc.c Sun Nov 14 06:09:50 2010 (r215281) @@ -144,7 +144,7 @@ struct mtx ppeers_lock; uma_zone_t proc_zone; int kstack_pages = KSTACK_PAGES; -SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "Kernel stack size in pages"); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); #ifdef COMPAT_FREEBSD32 Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/kern_tc.c Sun Nov 14 06:09:50 2010 (r215281) @@ -103,7 +103,7 @@ SYSCTL_NODE(_kern_timecounter, OID_AUTO, static int timestepwarnings; SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, - ×tepwarnings, 0, ""); + ×tepwarnings, 0, "Log time steps"); static void tc_windup(void); static void cpu_tick_calibrate(int); @@ -560,7 +560,7 @@ sysctl_kern_timecounter_hardware(SYSCTL_ } SYSCTL_PROC(_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, sysctl_kern_timecounter_hardware, "A", ""); + 0, 0, sysctl_kern_timecounter_hardware, "A", "Timecounter hardware selected"); /* Report or change the active timecounter hardware. */ @@ -583,7 +583,7 @@ sysctl_kern_timecounter_choice(SYSCTL_HA } SYSCTL_PROC(_kern_timecounter, OID_AUTO, choice, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_kern_timecounter_choice, "A", ""); + 0, 0, sysctl_kern_timecounter_choice, "A", "Timecounter hardware detected"); /* * RFC 2783 PPS-API implementation. @@ -768,7 +768,7 @@ pps_event(struct pps_state *pps, int eve */ static int tc_tick; -SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, ""); +SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, "Approximate number of hardclock ticks in a millisecond"); void tc_ticktock(int cnt) Modified: head/sys/kern/subr_clock.c ============================================================================== --- head/sys/kern/subr_clock.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/subr_clock.c Sun Nov 14 06:09:50 2010 (r215281) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #define ct_debug bootverbose -static int adjkerntz; /* local offset from GMT in seconds */ +static int adjkerntz; /* local offset from UTC in seconds */ static int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ int tz_minuteswest; @@ -61,7 +61,7 @@ int tz_dsttime; * kern. */ SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) @@ -74,7 +74,7 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ } SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "Local offset from UTC in seconds"); /*--------------------------------------------------------------------* * Generic routines to convert between a POSIX date Modified: head/sys/kern/sysv_sem.c ============================================================================== --- head/sys/kern/sysv_sem.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/sysv_sem.c Sun Nov 14 06:09:50 2010 (r215281) @@ -212,7 +212,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, semvmx, SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, CTLFLAG_RW, &seminfo.semaem, 0, "Adjust on exit max value"); SYSCTL_PROC(_kern_ipc, OID_AUTO, sema, CTLFLAG_RD, - NULL, 0, sysctl_sema, "", ""); + NULL, 0, sysctl_sema, "", "Semaphore id pool"); static struct syscall_helper_data sem_syscalls[] = { SYSCALL_INIT_HELPER(__semctl), Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/vfs_cache.c Sun Nov 14 06:09:50 2010 (r215281) @@ -184,27 +184,27 @@ SYSCTL_INT(_debug, OID_AUTO, vfscache, C /* Export size information to userland */ SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, 0, - sizeof(struct namecache), ""); + sizeof(struct namecache), "sizeof(struct namecache)"); /* * The new name cache statistics */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics"); -#define STATNODE(mode, name, var) \ - SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, ""); -STATNODE(CTLFLAG_RD, numneg, &numneg); -STATNODE(CTLFLAG_RD, numcache, &numcache); -static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls); -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); -static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits); -static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades); +#define STATNODE(mode, name, var, descr) \ + SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr); +STATNODE(CTLFLAG_RD, numneg, &numneg, "Number of negative cache entries"); +STATNODE(CTLFLAG_RD, numcache, &numcache, "Number of cache entries"); +static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls, "Number of cache lookups"); +static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits, "Number of '.' hits"); +static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits, "Number of '..' hits"); +static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks, "Number of checks in lookup"); +static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss, "Number of cache misses"); +static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, "Number of cache misses we do not want to cache"); +static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, "Number of cache hits (positive) we do not want to cache"); +static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, "Number of cache hits (positive)"); +static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps, "Number of cache hits (negative) we do not want to cache"); +static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits, "Number of cache hits (negative)"); +static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades, "Number of updates of the cache after lookup (write lock + retry)"); SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD | CTLFLAG_MPSAFE, &nchstats, sizeof(nchstats), "LU", "VFS cache effectiveness statistics"); @@ -970,20 +970,20 @@ kern___getcwd(struct thread *td, u_char */ #undef STATNODE -#define STATNODE(name) \ +#define STATNODE(name, descr) \ static u_int name; \ - SYSCTL_UINT(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, "") + SYSCTL_UINT(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, descr) static int disablefullpath; SYSCTL_INT(_debug, OID_AUTO, disablefullpath, CTLFLAG_RW, &disablefullpath, 0, "Disable the vn_fullpath function"); /* These count for kern___getcwd(), too. */ -STATNODE(numfullpathcalls); -STATNODE(numfullpathfail1); -STATNODE(numfullpathfail2); -STATNODE(numfullpathfail4); -STATNODE(numfullpathfound); +STATNODE(numfullpathcalls, "Number of fullpath search calls"); +STATNODE(numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); +STATNODE(numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); +STATNODE(numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); +STATNODE(numfullpathfound, "Number of successful fullpath calls"); /* * Retrieve the full filesystem path that correspond to a vnode from the name