Make ADAPTIVE_GIANT as the default in the kernel and remove the option.
Currently, Giant is not too much contented so that it is ok to treact it like any other mutexes. Please don't forget to update your own custom config kernel files. Approved by: cognet, marcel (maintainers of arches where option is not enabled at the moment)
This commit is contained in:
parent
fcdde99a89
commit
573c6b82df
@ -59,7 +59,6 @@ options SYSVMSG # SYSV-style message queues
|
||||
options SYSVSEM # SYSV-style semaphores
|
||||
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
|
||||
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
|
||||
options ADAPTIVE_GIANT # Giant mutex is adaptive.
|
||||
options STOP_NMI # Stop CPUS using NMI instead of IPI
|
||||
options AUDIT # Security event auditing
|
||||
|
||||
|
@ -206,12 +206,6 @@ options NO_ADAPTIVE_MUTEXES
|
||||
# to disable it.
|
||||
options NO_ADAPTIVE_RWLOCKS
|
||||
|
||||
# ADAPTIVE_GIANT causes the Giant lock to also be made adaptive when
|
||||
# running without NO_ADAPTIVE_MUTEXES. Normally, because Giant is assumed
|
||||
# to be held for extended periods, contention on Giant will cause a thread
|
||||
# to sleep rather than spinning.
|
||||
options ADAPTIVE_GIANT
|
||||
|
||||
# ADAPTIVE_SX changes the behavior of sx locks to spin if the thread
|
||||
# that currently owns the lock is executing on another CPU. Note that
|
||||
# in addition to enabling this option, individual sx locks must be
|
||||
|
@ -58,7 +58,6 @@ SYSCTL_DEBUG opt_sysctl.h
|
||||
NO_SYSCTL_DESCR opt_global.h
|
||||
|
||||
# Miscellaneous options.
|
||||
ADAPTIVE_GIANT opt_adaptive_mutexes.h
|
||||
ADAPTIVE_SX
|
||||
ALQ
|
||||
AUDIT opt_global.h
|
||||
|
@ -59,7 +59,6 @@ options SYSVMSG # SYSV-style message queues
|
||||
options SYSVSEM # SYSV-style semaphores
|
||||
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
|
||||
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
|
||||
options ADAPTIVE_GIANT # Giant mutex is adaptive.
|
||||
options STOP_NMI # Stop CPUS using NMI instead of IPI
|
||||
options AUDIT # Security event auditing
|
||||
|
||||
|
@ -41,7 +41,6 @@ options CD9660 # ISO 9660 Filesystem
|
||||
#options SYSVSEM # SYSV-style semaphores
|
||||
#options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
|
||||
#options KBD_INSTALL_CDEV # install a CDEV entry in /dev
|
||||
options ADAPTIVE_GIANT # Giant mutex is adaptive.
|
||||
# Xbox has a non-standard default timer frequency
|
||||
options TIMER_FREQ=1125000 # Gives ~733.34MHz CPU
|
||||
|
||||
|
@ -343,11 +343,7 @@ _mtx_lock_sleep(struct mtx *m, uintptr_t tid, int opts, const char *file,
|
||||
v = m->mtx_lock;
|
||||
if (v != MTX_UNOWNED) {
|
||||
owner = (struct thread *)(v & ~MTX_FLAGMASK);
|
||||
#ifdef ADAPTIVE_GIANT
|
||||
if (TD_IS_RUNNING(owner)) {
|
||||
#else
|
||||
if (m != &Giant && TD_IS_RUNNING(owner)) {
|
||||
#endif
|
||||
if (LOCK_LOG_TEST(&m->lock_object, 0))
|
||||
CTR3(KTR_LOCK,
|
||||
"%s: spinning on %p held by %p",
|
||||
@ -381,11 +377,7 @@ _mtx_lock_sleep(struct mtx *m, uintptr_t tid, int opts, const char *file,
|
||||
* CPU quit the hard path and try to spin.
|
||||
*/
|
||||
owner = (struct thread *)(v & ~MTX_FLAGMASK);
|
||||
#ifdef ADAPTIVE_GIANT
|
||||
if (TD_IS_RUNNING(owner)) {
|
||||
#else
|
||||
if (m != &Giant && TD_IS_RUNNING(owner)) {
|
||||
#endif
|
||||
turnstile_cancel(ts);
|
||||
cpu_spinwait();
|
||||
continue;
|
||||
|
@ -60,7 +60,6 @@ options SYSVSHM # SYSV-style shared memory
|
||||
options SYSVMSG # SYSV-style message queues
|
||||
options SYSVSEM # SYSV-style semaphores
|
||||
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
|
||||
options ADAPTIVE_GIANT # Giant mutex is adaptive.
|
||||
options AUDIT # Security event auditing
|
||||
|
||||
# Debugging for use in -current
|
||||
|
@ -61,7 +61,6 @@ options SYSVSEM # SYSV-style semaphores
|
||||
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
|
||||
options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
|
||||
# output. Adds ~128k to driver.
|
||||
options ADAPTIVE_GIANT # Giant mutex is adaptive.
|
||||
options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed.
|
||||
options AUDIT # Security event auditing
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user