mirror_zfs/module/zfs
Paul Dagnelie f664f1ee7f Decrease contention on dn_struct_rwlock
Currently, sequential async write workloads spend a lot of time 
contending on the dn_struct_rwlock. This lock is responsible for 
protecting the entire block tree below it; this naturally results 
in some serialization during heavy write workloads. This can be 
resolved by having per-dbuf locking, which will allow multiple 
writers in the same object at the same time.

We introduce a new rwlock, the db_rwlock. This lock is responsible 
for protecting the contents of the dbuf that it is a part of; when 
reading a block pointer from a dbuf, you hold the lock as a reader. 
When writing data to a dbuf, you hold it as a writer. This allows 
multiple threads to write to different parts of a file at the same 
time.

Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Matt Ahrens matt@delphix.com
Reviewed by: George Wilson george.wilson@delphix.com
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
External-issue: DLPX-52564
External-issue: DLPX-53085
External-issue: DLPX-57384
Closes #8946
2019-07-08 13:18:50 -07:00
..
abd.c single-chunk scatter ABDs can be treated as linear 2019-06-11 09:02:31 -07:00
aggsum.c OpenZFS 9688 - aggsum_fini leaks memory 2018-10-19 12:08:03 -07:00
arc.c Check b_freeze_cksum under ZFS_DEBUG_MODIFY conditional 2019-07-03 13:01:54 -07:00
blkptr.c
bplist.c
bpobj.c
bptree.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
bqueue.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
cityhash.c
dataset_kstats.c
dbuf_stats.c Prefix all refcount functions with zfs_ 2018-10-01 10:42:05 -07:00
dbuf.c Decrease contention on dn_struct_rwlock 2019-07-08 13:18:50 -07:00
ddt_zap.c fat zap should prefetch when iterating 2019-06-12 13:13:09 -07:00
ddt.c Remove dedupditto functionality 2019-06-19 14:54:02 -07:00
dmu_diff.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dmu_object.c Fix send/recv lost spill block 2019-05-07 15:18:44 -07:00
dmu_objset.c Avoid extra taskq_dispatch() calls by DMU 2019-06-25 12:03:38 -07:00
dmu_recv.c Allow unencrypted children of encrypted datasets 2019-06-20 12:29:51 -07:00
dmu_redact.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dmu_send.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dmu_traverse.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dmu_tx.c Remove code for zfs remap 2019-06-24 16:44:01 -07:00
dmu_zfetch.c Decrease contention on dn_struct_rwlock 2019-07-08 13:18:50 -07:00
dmu.c Decrease contention on dn_struct_rwlock 2019-07-08 13:18:50 -07:00
dnode_sync.c Decrease contention on dn_struct_rwlock 2019-07-08 13:18:50 -07:00
dnode.c Decrease contention on dn_struct_rwlock 2019-07-08 13:18:50 -07:00
dsl_bookmark.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dsl_crypt.c Remove VERIFY from dsl_dataset_crypt_stats() 2019-07-05 16:53:14 -07:00
dsl_dataset.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dsl_deadlist.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dsl_deleg.c Update build system and packaging 2018-05-29 16:00:33 -07:00
dsl_destroy.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dsl_dir.c Remove code for zfs remap 2019-06-24 16:44:01 -07:00
dsl_pool.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dsl_prop.c
dsl_scan.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
dsl_synctask.c OpenZFS 9425 - channel programs can be interrupted 2019-06-22 16:51:46 -07:00
dsl_userhold.c
edonr_zfs.c
fm.c
gzip.c
hkdf.c
lz4.c Reword comment in lz4_compress_zfs 2019-05-02 16:46:04 -07:00
lzjb.c
Makefile.in Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
metaslab.c Don't activate metaslabs with weight 0 2019-07-05 16:45:20 -07:00
mmp.c
multilist.c Avoid extra taskq_dispatch() calls by DMU 2019-06-25 12:03:38 -07:00
objlist.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
pathname.c
policy.c
qat_compress.c
qat_crypt.c
qat.c
qat.h
range_tree.c
refcount.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
rrwlock.c 8659 static dtrace probes unavailable on non-GPL modules 2019-07-08 11:20:53 -07:00
sa.c
sha256.c
skein_zfs.c
spa_boot.c
spa_checkpoint.c
spa_config.c Remove vn_set_fs_pwd()/vn_set_pwd() (no need to be at / during insmod) 2019-05-29 16:18:14 -07:00
spa_errlog.c
spa_history.c
spa_misc.c Fix coverity defects: CID 186143 2019-05-23 19:17:00 -07:00
spa_stats.c
spa.c Remove dedupditto functionality 2019-06-19 14:54:02 -07:00
space_map.c
space_reftree.c
THIRDPARTYLICENSE.cityhash
THIRDPARTYLICENSE.cityhash.descrip
trace.c 8659 static dtrace probes unavailable on non-GPL modules 2019-07-08 11:20:53 -07:00
txg.c OpenZFS 9425 - channel programs can be interrupted 2019-06-22 16:51:46 -07:00
uberblock.c
unique.c
vdev_cache.c
vdev_disk.c Revert "Fail early on bio corruption confirmed on 5.2-rc1" 2019-07-05 20:38:56 -07:00
vdev_file.c Update vdev_ops_t from illumos 2019-06-20 18:29:02 -07:00
vdev_indirect_births.c
vdev_indirect_mapping.c
vdev_indirect.c Update vdev_ops_t from illumos 2019-06-20 18:29:02 -07:00
vdev_initialize.c Add TRIM support 2019-03-29 09:13:20 -07:00
vdev_label.c panic in removal_remap test on 4K devices 2019-06-13 13:12:39 -07:00
vdev_mirror.c Update vdev_ops_t from illumos 2019-06-20 18:29:02 -07:00
vdev_missing.c Update vdev_ops_t from illumos 2019-06-20 18:29:02 -07:00
vdev_queue.c Move write aggregation memory copy out of vq_lock 2019-06-13 13:08:24 -07:00
vdev_raidz_math_aarch64_neon_common.h Linux 5.0 compat: ASM_BUG macro 2019-05-08 10:18:40 -07:00
vdev_raidz_math_aarch64_neon.c
vdev_raidz_math_aarch64_neonx2.c
vdev_raidz_math_avx2.c Linux 5.0 compat: ASM_BUG macro 2019-05-08 10:18:40 -07:00
vdev_raidz_math_avx512bw.c Linux 5.0 compat: ASM_BUG macro 2019-05-08 10:18:40 -07:00
vdev_raidz_math_avx512f.c
vdev_raidz_math_impl.h
vdev_raidz_math_scalar.c
vdev_raidz_math_sse2.c
vdev_raidz_math_ssse3.c Linux 5.0 compat: ASM_BUG macro 2019-05-08 10:18:40 -07:00
vdev_raidz_math.c Fix typo in vdev_raidz_math.c 2019-06-12 13:03:33 -07:00
vdev_raidz.c Update vdev_ops_t from illumos 2019-06-20 18:29:02 -07:00
vdev_removal.c panic in removal_remap test on 4K devices 2019-06-13 13:12:39 -07:00
vdev_root.c Update vdev_ops_t from illumos 2019-06-20 18:29:02 -07:00
vdev_trim.c
vdev.c Allow metaslab to be unloaded even when not freed from 2019-06-06 19:10:43 -07:00
zap_leaf.c Off-by-one in zap_leaf_array_create() 2019-01-18 09:58:46 -08:00
zap_micro.c fat zap should prefetch when iterating 2019-06-12 13:13:09 -07:00
zap.c fat zap should prefetch when iterating 2019-06-12 13:13:09 -07:00
zcp_get.c
zcp_global.c
zcp_iter.c
zcp_synctask.c
zcp.c OpenZFS 9425 - channel programs can be interrupted 2019-06-22 16:51:46 -07:00
zfeature.c
zfs_acl.c
zfs_byteswap.c
zfs_ctldir.c Improve "Unable to automount" error message. 2019-07-03 13:05:02 -07:00
zfs_debug.c
zfs_dir.c
zfs_fm.c
zfs_fuid.c
zfs_ioctl.c Remove code for zfs remap 2019-06-24 16:44:01 -07:00
zfs_log.c make zil max block size tunable 2019-06-10 11:48:42 -07:00
zfs_onexit.c
zfs_ratelimit.c
zfs_replay.c
zfs_rlock.c
zfs_sa.c
zfs_sysfs.c Prevent pointer to an out-of-scope local variable 2019-06-20 18:31:52 -07:00
zfs_vfsops.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
zfs_vnops.c Update descriptions for vnops 2019-05-25 14:29:10 -07:00
zfs_znode.c Fix integer overflow of ZTOI(zp)->i_generation 2019-06-06 12:59:39 -07:00
zil.c make zil max block size tunable 2019-06-10 11:48:42 -07:00
zio_checksum.c
zio_compress.c
zio_crypt.c
zio_inject.c
zio.c nopwrites on dmu_sync-ed blocks can result in a panic 2019-06-28 12:40:23 -07:00
zle.c
zpl_ctldir.c
zpl_export.c
zpl_file.c Fix errant EFAULT during writes (#8719) 2019-05-08 10:04:04 -07:00
zpl_inode.c Fix errant EFAULT during writes (#8719) 2019-05-08 10:04:04 -07:00
zpl_super.c Fix statfs(2) for 32-bit user space 2018-09-24 17:11:25 -07:00
zpl_xattr.c
zrlock.c
zthr.c Fix txg_wait_open() load average inflation 2019-04-04 09:44:46 -07:00
zvol.c Add SCSI_PASSTHROUGH to zvols to enable UNMAP support 2019-06-21 09:40:56 -07:00