diff options
author | Attilio Rao <attilio@FreeBSD.org> | 2007-11-28 05:50:45 +0000 |
---|---|---|
committer | Attilio Rao <attilio@FreeBSD.org> | 2007-11-28 05:50:45 +0000 |
commit | 573c6b82dfdf12e9f7a4cdf0195af3aee772ef9d (patch) | |
tree | 604a607a57f7d90d56219cf4a840591bc8ac48c3 | |
parent | fcdde99a891801d0690e37b9c086dafe37114e1f (diff) | |
download | src-573c6b82dfdf12e9f7a4cdf0195af3aee772ef9d.tar.gz src-573c6b82dfdf12e9f7a4cdf0195af3aee772ef9d.zip |
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)
Notes
Notes:
svn path=/head/; revision=174005
-rw-r--r-- | sys/amd64/conf/GENERIC | 1 | ||||
-rw-r--r-- | sys/conf/NOTES | 6 | ||||
-rw-r--r-- | sys/conf/options | 1 | ||||
-rw-r--r-- | sys/i386/conf/GENERIC | 1 | ||||
-rw-r--r-- | sys/i386/conf/XBOX | 1 | ||||
-rw-r--r-- | sys/kern/kern_mutex.c | 8 | ||||
-rw-r--r-- | sys/sparc64/conf/GENERIC | 1 | ||||
-rw-r--r-- | sys/sun4v/conf/GENERIC | 1 |
8 files changed, 0 insertions, 20 deletions
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index b6af8687e7dc..a809f8e0821d 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -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 diff --git a/sys/conf/NOTES b/sys/conf/NOTES index fed66b51e3d5..2f625982ab66 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -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 diff --git a/sys/conf/options b/sys/conf/options index 96aedc1a1b92..143c0aa96ad2 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -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 diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index ad52c0055024..fc1b5a0970f0 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -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 diff --git a/sys/i386/conf/XBOX b/sys/i386/conf/XBOX index 4c749b2da0a2..99026205b224 100644 --- a/sys/i386/conf/XBOX +++ b/sys/i386/conf/XBOX @@ -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 diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 56c6e000e20a..727871d411c5 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -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; diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC index 0f4375462811..29df4746944c 100644 --- a/sys/sparc64/conf/GENERIC +++ b/sys/sparc64/conf/GENERIC @@ -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 diff --git a/sys/sun4v/conf/GENERIC b/sys/sun4v/conf/GENERIC index 08f400c31fbd..d67c1ddd9430 100644 --- a/sys/sun4v/conf/GENERIC +++ b/sys/sun4v/conf/GENERIC @@ -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 |