diff options
author | Matthew Ahrens <[email protected]> | 2019-07-25 11:57:58 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-07-25 11:57:58 -0700 |
commit | 1ff46825e232b3ad3414f60fab8dcba8ed17d778 (patch) | |
tree | 60a3a9b0a0029b74374b72297cf23f5b536d1977 /module/zfs/dnode.c | |
parent | 09276fde1ce7730804957da88350c893d635526b (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 'module/zfs/dnode.c')
-rw-r--r-- | module/zfs/dnode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c index d7cd5ce78..c9ff43fa6 100644 --- a/module/zfs/dnode.c +++ b/module/zfs/dnode.c @@ -752,7 +752,7 @@ dnode_move_impl(dnode_t *odn, dnode_t *ndn) ASSERT(!RW_LOCK_HELD(&odn->dn_struct_rwlock)); ASSERT(MUTEX_NOT_HELD(&odn->dn_mtx)); ASSERT(MUTEX_NOT_HELD(&odn->dn_dbufs_mtx)); - ASSERT(!RW_LOCK_HELD(&odn->dn_zfetch.zf_rwlock)); + ASSERT(!MUTEX_HELD(&odn->dn_zfetch.zf_lock)); /* Copy fields. */ ndn->dn_objset = odn->dn_objset; |