summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2019-07-30 09:18:30 -0700
committerBrian Behlendorf <[email protected]>2019-07-30 09:18:30 -0700
commit0eb8ba6ab68801d4b0e6280e7388514a6355fc86 (patch)
tree0c93c95bc24643bb354a3f4ebfd511b3ac3d82fa /contrib
parent1e620c98727a5a5cff1af70fef9bc25626b4e9d8 (diff)
Improve performance by using dmu_tx_hold_*_by_dnode()
In zfs_write() and dmu_tx_hold_sa(), we can use dmu_tx_hold_*_by_dnode() instead of dmu_tx_hold_*(), since we already have a dbuf from the target dnode in hand. This eliminates some calls to dnode_hold(), which can be expensive. This is especially impactful if several threads are accessing objects that are in the same block of dnodes, because they will contend for that dbuf's lock. We are seeing 10-20% performance wins for the sequential_writes tests in the performance test suite, when doing >=128K writes to files with recordsize=8K. This also removes some unnecessary casts that are in the area. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #9081
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions