svn commit: r310774 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Thu Dec 29 12:01:56 UTC 2016
Author: mjg
Date: Thu Dec 29 12:01:54 2016
New Revision: 310774
URL: https://svnweb.freebsd.org/changeset/base/310774
Log:
cache: move shrink lock init to nchinit
This gets rid of unnecesary sysinit usage.
While here also rename the lock to be consistent with the rest.
Modified:
head/sys/kern/vfs_cache.c
Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c Thu Dec 29 11:32:42 2016 (r310773)
+++ head/sys/kern/vfs_cache.c Thu Dec 29 12:01:54 2016 (r310774)
@@ -229,8 +229,6 @@ SYSCTL_UINT(_vfs, OID_AUTO, ncneghitsreq
struct nchstats nchstats; /* cache effectiveness statistics */
static struct mtx ncneg_shrink_lock;
-MTX_SYSINIT(vfscache_shrink_neg, &ncneg_shrink_lock, "Name Cache shrink neg",
- MTX_DEF);
struct neglist {
struct mtx nl_lock;
@@ -1802,6 +1800,8 @@ nchinit(void *dummy __unused)
mtx_init(&ncneg_hot.nl_lock, "ncneglh", NULL, MTX_DEF);
TAILQ_INIT(&ncneg_hot.nl_list);
+ mtx_init(&ncneg_shrink_lock, "ncnegs", NULL, MTX_DEF);
+
numcalls = counter_u64_alloc(M_WAITOK);
dothits = counter_u64_alloc(M_WAITOK);
dotdothits = counter_u64_alloc(M_WAITOK);
More information about the svn-src-all
mailing list