summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cache.c
diff options
context:
space:
mode:
authorbrucec <brucec@FreeBSD.org>2010-11-14 06:09:50 +0000
committerbrucec <brucec@FreeBSD.org>2010-11-14 06:09:50 +0000
commit10ef7fee733881a2cd9d8c942c7fb1d8046863cb (patch)
tree70565c7e0c90a6038107d6490613b9630e6f1b06 /sys/kern/vfs_cache.c
parent42557eb9d1e6c6c68123a5603878be4725a563ed (diff)
downloadFreeBSD-src-10ef7fee733881a2cd9d8c942c7fb1d8046863cb.zip
FreeBSD-src-10ef7fee733881a2cd9d8c942c7fb1d8046863cb.tar.gz
Add some descriptions to sys/kern sysctls.
PR: kern/148710 Tested by: Chip Camden <sterling at camdensoftware.com> MFC after: 1 week
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r--sys/kern/vfs_cache.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 0efdbc1..fd3f32c 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -184,27 +184,27 @@ SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0,
/* 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 *buf, enum uio_seg bufseg, u_int buflen)
*/
#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
OpenPOWER on IntegriCloud