]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dbuf.c
Cache dbuf_hash() calculation
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Wed, 14 Dec 2022 01:29:21 +0000 (20:29 -0500)
committerGitHub <noreply@github.com>
Wed, 14 Dec 2022 01:29:21 +0000 (17:29 -0800)
commit3236c0b891d0a09475bef8b6186ac8beed792fe9
tree03c7049b8548301ef8830fc2a2141afa8aa7a3c4
parentdc95911d21a19930848302aac9283fff68e4a41b
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
include/sys/dbuf.h
module/zfs/dbuf.c
module/zfs/dnode_sync.c