From owner-svn-src-head@freebsd.org Wed May 18 03:34:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EB39B3F3DE; Wed, 18 May 2016 03:34:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 40A90178B; Wed, 18 May 2016 03:34:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4I3Y2DA006636; Wed, 18 May 2016 03:34:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4I3Y2Me006633; Wed, 18 May 2016 03:34:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201605180334.u4I3Y2Me006633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 18 May 2016 03:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300106 - in head/sys: conf kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2016 03:34:03 -0000 Author: markj Date: Wed May 18 03:34:02 2016 New Revision: 300106 URL: https://svnweb.freebsd.org/changeset/base/300106 Log: Remove the MUTEX_DEBUG kernel option. It has no counterpart among the other lock primitives and has been a no-op for years. Mutex consistency checks are generally done whenver INVARIANTS is enabled. Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/kern/kern_mutex.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed May 18 03:28:51 2016 (r300105) +++ head/sys/conf/NOTES Wed May 18 03:34:02 2016 (r300106) @@ -298,7 +298,6 @@ options SX_NOINLINE # performance and increase the frequency of kernel panics by # design. If you aren't sure that you need it then you don't. # Relies on the PREEMPTION option. DON'T TURN THIS ON. -# MUTEX_DEBUG enables various extra assertions in the mutex code. # SLEEPQUEUE_PROFILING enables rudimentary profiling of the hash table # used to hold active sleep queues as well as sleep wait message # frequency. @@ -314,7 +313,6 @@ options SX_NOINLINE # WITNESS_SKIPSPIN disables the witness checks on spin mutexes. options PREEMPTION options FULL_PREEMPTION -options MUTEX_DEBUG options WITNESS options WITNESS_KDB options WITNESS_SKIPSPIN Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed May 18 03:28:51 2016 (r300105) +++ head/sys/conf/options Wed May 18 03:34:02 2016 (r300106) @@ -590,7 +590,6 @@ MAXCPU opt_global.h MAXMEMDOM opt_global.h MAXPHYS opt_global.h MCLSHIFT opt_global.h -MUTEX_DEBUG opt_global.h MUTEX_NOINLINE opt_global.h LOCK_PROFILING opt_global.h LOCK_PROFILING_FAST opt_global.h Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Wed May 18 03:28:51 2016 (r300105) +++ head/sys/kern/kern_mutex.c Wed May 18 03:34:02 2016 (r300106) @@ -845,37 +845,6 @@ __mtx_assert(const volatile uintptr_t *c #endif /* - * The MUTEX_DEBUG-enabled mtx_validate() - * - * Most of these checks have been moved off into the LO_INITIALIZED flag - * maintained by the witness code. - */ -#ifdef MUTEX_DEBUG - -void mtx_validate(struct mtx *); - -void -mtx_validate(struct mtx *m) -{ - -/* - * XXX: When kernacc() does not require Giant we can reenable this check - */ -#ifdef notyet - /* - * Can't call kernacc() from early init386(), especially when - * initializing Giant mutex, because some stuff in kernacc() - * requires Giant itself. - */ - if (!cold) - if (!kernacc((caddr_t)m, sizeof(m), - VM_PROT_READ | VM_PROT_WRITE)) - panic("Can't read and write to mutex %p", m); -#endif -} -#endif - -/* * General init routine used by the MTX_SYSINIT() macro. */ void @@ -908,11 +877,6 @@ _mtx_init(volatile uintptr_t *c, const c ("%s: mtx_lock not aligned for %s: %p", __func__, name, &m->mtx_lock)); -#ifdef MUTEX_DEBUG - /* Diagnostic and error correction */ - mtx_validate(m); -#endif - /* Determine lock class and lock flags. */ if (opts & MTX_SPIN) class = &lock_class_mtx_spin;