Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2014 03:50:30 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r269655 - in stable/10/sys/fs: nfs nfsserver
Message-ID:  <53e2f786.5aba.3c6c17b7@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Aug  7 03:50:30 2014
New Revision: 269655
URL: http://svnweb.freebsd.org/changeset/base/269655

Log:
  MFC r269347:
  Do not generate 1000 unique lock names for nfsrc hash chain locks.
  Shorten the names of some nfs mutexes.

Modified:
  stable/10/sys/fs/nfs/nfsrvcache.h
  stable/10/sys/fs/nfsserver/nfs_nfsdport.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfs/nfsrvcache.h
==============================================================================
--- stable/10/sys/fs/nfs/nfsrvcache.h	Thu Aug  7 02:26:45 2014	(r269654)
+++ stable/10/sys/fs/nfs/nfsrvcache.h	Thu Aug  7 03:50:30 2014	(r269655)
@@ -116,7 +116,6 @@ LIST_HEAD(nfsrvhashhead, nfsrvcache);
 /* The fine-grained locked cache hash table for TCP. */
 struct nfsrchash_bucket {
 	struct mtx		mtx;
-	char			lock_name[16];
 	struct nfsrvhashhead	tbl;
 };
 

Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/10/sys/fs/nfsserver/nfs_nfsdport.c	Thu Aug  7 02:26:45 2014	(r269654)
+++ stable/10/sys/fs/nfsserver/nfs_nfsdport.c	Thu Aug  7 03:50:30 2014	(r269655)
@@ -3321,23 +3321,16 @@ nfsd_modevent(module_t mod, int type, vo
 			goto out;
 		newnfs_portinit();
 		for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) {
-			snprintf(nfsrchash_table[i].lock_name,
-			    sizeof(nfsrchash_table[i].lock_name), "nfsrc_tcp%d",
-			    i);
-			mtx_init(&nfsrchash_table[i].mtx,
-			    nfsrchash_table[i].lock_name, NULL, MTX_DEF);
-			snprintf(nfsrcahash_table[i].lock_name,
-			    sizeof(nfsrcahash_table[i].lock_name), "nfsrc_tcpa%d",
-			    i);
-			mtx_init(&nfsrcahash_table[i].mtx,
-			    nfsrcahash_table[i].lock_name, NULL, MTX_DEF);
+			mtx_init(&nfsrchash_table[i].mtx, "nfsrtc", NULL,
+			    MTX_DEF);
+			mtx_init(&nfsrcahash_table[i].mtx, "nfsrtca", NULL,
+			    MTX_DEF);
 		}
-		mtx_init(&nfsrc_udpmtx, "nfs_udpcache_mutex", NULL, MTX_DEF);
-		mtx_init(&nfs_v4root_mutex, "nfs_v4root_mutex", NULL, MTX_DEF);
-		mtx_init(&nfsv4root_mnt.mnt_mtx, "struct mount mtx", NULL,
-		    MTX_DEF);
+		mtx_init(&nfsrc_udpmtx, "nfsuc", NULL, MTX_DEF);
+		mtx_init(&nfs_v4root_mutex, "nfs4rt", NULL, MTX_DEF);
+		mtx_init(&nfsv4root_mnt.mnt_mtx, "nfs4mnt", NULL, MTX_DEF);
 		for (i = 0; i < NFSSESSIONHASHSIZE; i++)
-			mtx_init(&nfssessionhash[i].mtx, "nfs_session_mutex",
+			mtx_init(&nfssessionhash[i].mtx, "nfssm",
 			    NULL, MTX_DEF);
 		lockinit(&nfsv4root_mnt.mnt_explock, PVFS, "explock", 0, 0);
 		nfsrvd_initcache();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e2f786.5aba.3c6c17b7>