diff options
author | scottl <scottl@FreeBSD.org> | 2004-07-18 15:59:03 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2004-07-18 15:59:03 +0000 |
commit | 7ad60316cd2a6fab33bff1ecd701c1d696895b96 (patch) | |
tree | ac22ab2a20ec2a247773c0b4fbd9fd368f767eb2 /sys/kern | |
parent | cf328c10576453a3e63ec1ff22f92f1b352db615 (diff) | |
download | FreeBSD-src-7ad60316cd2a6fab33bff1ecd701c1d696895b96.zip FreeBSD-src-7ad60316cd2a6fab33bff1ecd701c1d696895b96.tar.gz |
Enable ADAPTIVE_MUTEXES by default by changing the sense of the option to
NO_ADAPTIVE_MUTEXES. This option has been enabled by default on amd64 for
quite some time, and has been extensively tested on i386 and sparc64. It
shows measurable performance gains in many circumstances, and few negative
effects. It would be nice in t he future if adaptive mutexes actually went
to sleep after a certain amount of spinning, but that will require quite a
bit more testing.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_mutex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 662cd4c..ffb75e3 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -421,7 +421,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line) { struct turnstile *ts; struct thread *td = curthread; -#if defined(SMP) && defined(ADAPTIVE_MUTEXES) +#if defined(SMP) && !defined(NO_ADAPTIVE_MUTEXES) struct thread *owner; #endif uintptr_t v; @@ -503,7 +503,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line) continue; } -#if defined(SMP) && defined(ADAPTIVE_MUTEXES) +#if defined(SMP) && !defined(NO_ADAPTIVE_MUTEXES) /* * If the current owner of the lock is executing on another * CPU, spin instead of blocking. @@ -518,7 +518,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line) } continue; } -#endif /* SMP && ADAPTIVE_MUTEXES */ +#endif /* SMP && !NO_ADAPTIVE_MUTEXES */ /* * We definitely must sleep for this lock. |