Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2016 12:01:54 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310774 - head/sys/kern
Message-ID:  <201612291201.uBTC1sdj077798@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612291201.uBTC1sdj077798>