]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dbuf.c
Few microoptimizations to dbuf layer
authorAlexander Motin <mav@FreeBSD.org>
Wed, 5 Feb 2020 19:08:44 +0000 (14:08 -0500)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2020 19:08:44 +0000 (11:08 -0800)
commitcbd8f5b759a7903a04aa38d858bb36f5dac19cb5
tree0c4c88a3e2a286d37af575bd5c2a543dcdbcc246
parentcccbed9f98597c2c354b218b0578625cc26358aa
Few microoptimizations to dbuf layer

Move db_link into the same cache line as db_blkid and db_level.
It allows significantly reduce avl_add() time in dbuf_create() on
systems with large RAM and huge number of dbufs per dnode.

Avoid few accesses to dbuf_caches[].size, which is highly congested
under high IOPS and never stays in cache for a long time.  Use local
value we are receiving from zfs_refcount_add_many() any way.

Remove cache_size_bytes_max bump from dbuf_evict_one().  I don't see
a point to do it on dbuf eviction after we done it on insertion in
dbuf_rele_and_unlock().

Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #9931
include/sys/dbuf.h
module/zfs/dbuf.c