aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/compat/opensolaris/sys/rwlock.h
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2009-05-29 01:49:27 +0000
committerAttilio Rao <attilio@FreeBSD.org>2009-05-29 01:49:27 +0000
commit1ae1c2a3bde1246e052fed34be63bac5d6ba1c31 (patch)
tree4743eb3cdc33a7b72ea4fc1d92c144595e06994e /sys/cddl/compat/opensolaris/sys/rwlock.h
parent1a9dc239f5fcfcc1a18713cc53a3e9b28ba3edce (diff)
downloadsrc-1ae1c2a3bde1246e052fed34be63bac5d6ba1c31.tar.gz
src-1ae1c2a3bde1246e052fed34be63bac5d6ba1c31.zip
Reverse the logic for ADAPTIVE_SX option and enable it by default.
Introduce for this operation the reverse NO_ADAPTIVE_SX option. The flag SX_ADAPTIVESPIN to be passed to sx_init_flags(9) gets suppressed and the new flag, offering the reversed logic, SX_NOADAPTIVE is added. Additively implements adaptive spininning for sx held in shared mode. The spinning limit can be handled through sysctls in order to be tuned while the code doesn't reach the release, after which time they should be dropped probabilly. This change has made been necessary by recent benchmarks where it does improve concurrency of workloads in presence of high contention (ie. ZFS). KPI breakage is documented by __FreeBSD_version bumping, manpage and UPDATING updates. Requested by: jeff, kmacy Reviewed by: jeff Tested by: pho
Notes
Notes: svn path=/head/; revision=193011
Diffstat (limited to 'sys/cddl/compat/opensolaris/sys/rwlock.h')
-rw-r--r--sys/cddl/compat/opensolaris/sys/rwlock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cddl/compat/opensolaris/sys/rwlock.h b/sys/cddl/compat/opensolaris/sys/rwlock.h
index 0d4ac2e1e2a9..a3e55153bbcf 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 | SX_ADAPTIVESPIN)
+#define RW_FLAGS (SX_DUPOK | SX_NOWITNESS)
#else
-#define RW_FLAGS (SX_DUPOK | SX_ADAPTIVESPIN)
+#define RW_FLAGS (SX_DUPOK)
#endif
#define RW_READ_HELD(x) (rw_read_held((x)))