mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Cache dbuf_hash() calculation
We currently compute a 64-bit hash three times, which consumes 0.8% CPU time on ARC eviction heavy workloads. Caching the 64-bit value in the dbuf allows us to avoid that overhead. Sponsored-By: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Richard Yao <richard.yao@klarasystems.com> Closes #14251
This commit is contained in:
@@ -70,8 +70,8 @@ dnode_increase_indirection(dnode_t *dn, dmu_tx_t *tx)
|
||||
dmu_buf_impl_t *children[DN_MAX_NBLKPTR];
|
||||
ASSERT3U(nblkptr, <=, DN_MAX_NBLKPTR);
|
||||
for (i = 0; i < nblkptr; i++) {
|
||||
children[i] =
|
||||
dbuf_find(dn->dn_objset, dn->dn_object, old_toplvl, i);
|
||||
children[i] = dbuf_find(dn->dn_objset, dn->dn_object,
|
||||
old_toplvl, i, NULL);
|
||||
}
|
||||
|
||||
/* transfer dnode's block pointers to new indirect block */
|
||||
|
||||
Reference in New Issue
Block a user