mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-01 22:09:36 +03:00
f58040c0fc
Current rw_tryupgrade does rw_exit and then rw_tryenter(RW_RWITER), and then does rw_enter(RW_READER) if it fails. This violate the assumption that rw_tryupgrade should be atomic and could cause extra contention or even lock inversion. This patch we implement a proper rw_tryupgrade. For rwsem-spinlock, we take the spinlock to check rwsem->count and rwsem->wait_list. For normal rwsem, we use cmpxchg on rwsem->count to change the value from single reader to single writer. Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Chase <tim@chase2k.com> Closes zfsonlinux/zfs#4692 Closes #554 |
||
---|---|---|
.. | ||
bitops_compat.h | ||
compiler_compat.h | ||
delay_compat.h | ||
file_compat.h | ||
list_compat.h | ||
Makefile.am | ||
math64_compat.h | ||
mm_compat.h | ||
proc_compat.h | ||
rwsem_compat.h | ||
wait_compat.h | ||
zlib_compat.h |