diff options
author | Paul Dagnelie <[email protected]> | 2019-07-08 13:18:50 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-07-08 13:18:50 -0700 |
commit | f664f1ee7fc9dd7101171f6518c67951cb5bd8cf (patch) | |
tree | 790db3e84a6edf3bd67b1869cd81f3b312d06ba7 /module/zfs/zle.c | |
parent | cb709642216b5ac9be10039471c3c4bc27cb7cf2 (diff) |
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 <[email protected]>
Reviewed by: Matt Ahrens [email protected]
Reviewed by: George Wilson [email protected]
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
External-issue: DLPX-52564
External-issue: DLPX-53085
External-issue: DLPX-57384
Closes #8946
Diffstat (limited to 'module/zfs/zle.c')
0 files changed, 0 insertions, 0 deletions