mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
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 <behlendorf1@llnl.gov> Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Signed-off-by: Matthew Ahrens <mahrens@delphix.com> Closes #9062
This commit is contained in:
committed by
Brian Behlendorf
parent
09276fde1c
commit
1ff46825e2
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user