aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2019-07-25 11:57:58 -0700
committerBrian Behlendorf <[email protected]>2019-07-25 11:57:58 -0700
commit1ff46825e232b3ad3414f60fab8dcba8ed17d778 (patch)
tree60a3a9b0a0029b74374b72297cf23f5b536d1977 /include
parent09276fde1ce7730804957da88350c893d635526b (diff)
Replace zf_rwlock with a mutex
The rwlock implementation on linux does not perform as well as mutexes. We can realize a performance benefit by replacing the zf_rwlock with a mutex. Local microbenchmarks show ~50% improvement, and over NFS we see ~5% improvement on several of the ZFS Performance Tests cases, especially randwrite and seq_write. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Reviewed-by: Olaf Faaland <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #9062
Diffstat (limited to 'include')
-rw-r--r--include/sys/dmu_zfetch.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/dmu_zfetch.h b/include/sys/dmu_zfetch.h
index 1e539086d..4303ab314 100644
--- a/include/sys/dmu_zfetch.h
+++ b/include/sys/dmu_zfetch.h
@@ -56,7 +56,7 @@ typedef struct zstream {
} zstream_t;
typedef struct zfetch {
- krwlock_t zf_rwlock; /* protects zfetch structure */
+ kmutex_t zf_lock; /* protects zfetch structure */
list_t zf_stream; /* list of zstream_t's */
struct dnode *zf_dnode; /* dnode that owns this zfetch */
} zfetch_t;