diff options
author | attilio <attilio@FreeBSD.org> | 2007-11-28 05:50:45 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2007-11-28 05:50:45 +0000 |
commit | 2562874cb6c7148dd0a0e252035eeb28cc19eb23 (patch) | |
tree | 604a607a57f7d90d56219cf4a840591bc8ac48c3 /sys/kern/kern_mutex.c | |
parent | fe046575b02c69793e1a674d8e39b0a1d5766a07 (diff) | |
download | FreeBSD-src-2562874cb6c7148dd0a0e252035eeb28cc19eb23.zip FreeBSD-src-2562874cb6c7148dd0a0e252035eeb28cc19eb23.tar.gz |
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)
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r-- | sys/kern/kern_mutex.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 56c6e00..727871d 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; |