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.
This commit is contained in:
parent
632da4eb89
commit
be2dfd58fe
@ -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
|
||||
|
@ -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
|
||||
|
@ -844,37 +844,6 @@ __mtx_assert(const volatile uintptr_t *c, int what, const char *file, int line)
|
||||
}
|
||||
#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.
|
||||
*/
|
||||
@ -908,11 +877,6 @@ _mtx_init(volatile uintptr_t *c, const char *name, const char *type, int opts)
|
||||
("%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;
|
||||
|
Loading…
Reference in New Issue
Block a user