summaryrefslogtreecommitdiff
path: root/build_posix/aclocal/options.m4
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2014-08-28 14:34:01 -0400
committerKeith Bostic <keith@wiredtiger.com>2014-08-28 14:34:01 -0400
commitb9131073d0077e78eab9478a424594804f9ac963 (patch)
treee94ca2fc06f25d261f7de19a913c1ab80e494ac8 /build_posix/aclocal/options.m4
parent788f49cfa8ad8c839e878bd96ad42033c6dea32c (diff)
downloadmongo-b9131073d0077e78eab9478a424594804f9ac963.tar.gz
Switch from adaptive pthread mutexes by default, based on:
http://smalldatum.blogspot.com/2014/08/the-innodb-mutex.html There's more information here: http://stackoverflow.com/questions/19863734/what-is-pthread-mutex-adaptive-np Add a new option, --pthread_adaptive to configure adaptive mutexes. Don't list --pthread-logging in the --with-spinlock=XXX configure usage message, that's not for public use. Add a tuning page that talks about mutex choice.
Diffstat (limited to 'build_posix/aclocal/options.m4')
-rw-r--r--build_posix/aclocal/options.m44
1 files changed, 3 insertions, 1 deletions
diff --git a/build_posix/aclocal/options.m4 b/build_posix/aclocal/options.m4
index 54933130b05..2682c8ea82c 100644
--- a/build_posix/aclocal/options.m4
+++ b/build_posix/aclocal/options.m4
@@ -172,13 +172,15 @@ AH_TEMPLATE(SPINLOCK_TYPE, [Spinlock type from mutex.h.])
AC_MSG_CHECKING(if --with-spinlock option specified)
AC_ARG_WITH(spinlock,
[AS_HELP_STRING([--with-spinlock],
- [Spinlock type (pthread, pthread_logging or gcc).])],
+ [Spinlock type (pthread, pthread_adaptive or gcc).])],
[],
[with_spinlock=pthread])
case "$with_spinlock" in
gcc) AC_DEFINE(SPINLOCK_TYPE, SPINLOCK_GCC);;
pthread|pthreads)
AC_DEFINE(SPINLOCK_TYPE, SPINLOCK_PTHREAD_MUTEX);;
+pthread_adaptive|pthreads_adaptive)
+ AC_DEFINE(SPINLOCK_TYPE, SPINLOCK_PTHREAD_MUTEX_ADAPTIVE);;
pthread_logging|pthreads_logging)
AC_DEFINE(SPINLOCK_TYPE, SPINLOCK_PTHREAD_MUTEX_LOGGING);;
*) AC_MSG_ERROR([Unknown spinlock type "$with_spinlock"]);;