]> git.proxmox.com Git - mirror_zfs.git/commit
Switch refcount tracking from lists to AVL-trees.
authorAlexander Motin <mav@FreeBSD.org>
Wed, 14 Jun 2023 15:02:27 +0000 (11:02 -0400)
committerGitHub <noreply@github.com>
Wed, 14 Jun 2023 15:02:27 +0000 (08:02 -0700)
commitd057807ede05ce809e9ba1e2b47b12ada0d3b2ed
tree566bd7ea8eabce878a9fe85fecc0b9053cbdd61f
parent8af1104f83eb44501b83218ed456e2d4b0ac3521
Switch refcount tracking from lists to AVL-trees.

With large number of tracked references list searches under the lock
become too expensive, creating enormous lock contention.

On my tests with ZFS_DEBUG enabled this increases write throughput
with 32KB blocks from ~1.2GB/s to ~7.5GB/s.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #14970
include/sys/zfs_refcount.h
module/zfs/refcount.c