summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2009-05-16 23:56:45 +0000
committerkmacy <kmacy@FreeBSD.org>2009-05-16 23:56:45 +0000
commit8cfacd71f9083ebfb414b452ea57e6d04240a1cb (patch)
treeffa375bc1c8d84d251aac3fd072deec7221ac898
parentae5a5566ffec5b11a639b0013d46f5704a93d33c (diff)
downloadFreeBSD-src-8cfacd71f9083ebfb414b452ea57e6d04240a1cb.zip
FreeBSD-src-8cfacd71f9083ebfb414b452ea57e6d04240a1cb.tar.gz
enable adaptive spinning on zfs locks
-rw-r--r--sys/cddl/compat/opensolaris/sys/mutex.h4
-rw-r--r--sys/cddl/compat/opensolaris/sys/rwlock.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/cddl/compat/opensolaris/sys/mutex.h b/sys/cddl/compat/opensolaris/sys/mutex.h
index 8756cd0..56c41a4 100644
--- a/sys/cddl/compat/opensolaris/sys/mutex.h
+++ b/sys/cddl/compat/opensolaris/sys/mutex.h
@@ -47,9 +47,9 @@ typedef enum {
typedef struct sx kmutex_t;
#ifndef DEBUG
-#define MUTEX_FLAGS (SX_DUPOK | SX_NOWITNESS)
+#define MUTEX_FLAGS (SX_DUPOK | SX_NOWITNESS | SX_ADAPTIVESPIN)
#else
-#define MUTEX_FLAGS (SX_DUPOK)
+#define MUTEX_FLAGS (SX_DUPOK | SX_ADAPTIVESPIN)
#endif
#define mutex_init(lock, desc, type, arg) do { \
diff --git a/sys/cddl/compat/opensolaris/sys/rwlock.h b/sys/cddl/compat/opensolaris/sys/rwlock.h
index a3e5515..0d4ac2e 100644
--- a/sys/cddl/compat/opensolaris/sys/rwlock.h
+++ b/sys/cddl/compat/opensolaris/sys/rwlock.h
@@ -49,9 +49,9 @@ typedef enum {
typedef struct sx krwlock_t;
#ifndef DEBUG
-#define RW_FLAGS (SX_DUPOK | SX_NOWITNESS)
+#define RW_FLAGS (SX_DUPOK | SX_NOWITNESS | SX_ADAPTIVESPIN)
#else
-#define RW_FLAGS (SX_DUPOK)
+#define RW_FLAGS (SX_DUPOK | SX_ADAPTIVESPIN)
#endif
#define RW_READ_HELD(x) (rw_read_held((x)))
OpenPOWER on IntegriCloud