From owner-svn-src-all@FreeBSD.ORG Thu Jul 31 19:24:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A735869; Thu, 31 Jul 2014 19:24:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D61E2B8F; Thu, 31 Jul 2014 19:24:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s6VJOjk8064970; Thu, 31 Jul 2014 19:24:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s6VJOjwZ064968; Thu, 31 Jul 2014 19:24:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407311924.s6VJOjwZ064968@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 31 Jul 2014 19:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269347 - in head/sys/fs: nfs nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2014 19:24:45 -0000 Author: kib Date: Thu Jul 31 19:24:44 2014 New Revision: 269347 URL: http://svnweb.freebsd.org/changeset/base/269347 Log: Do not generate 1000 unique lock names for nfsrc hash chain locks. It overflows witness. Shorten the names of some nfs mutexes. Reported and tested by: pho No objections from: rmacklem, mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/nfs/nfsrvcache.h head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfsrvcache.h ============================================================================== --- head/sys/fs/nfs/nfsrvcache.h Thu Jul 31 18:54:40 2014 (r269346) +++ head/sys/fs/nfs/nfsrvcache.h Thu Jul 31 19:24:44 2014 (r269347) @@ -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: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Thu Jul 31 18:54:40 2014 (r269346) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Thu Jul 31 19:24:44 2014 (r269347) @@ -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();