]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/arc.c
Optimize arc_l2c_only lists assertions
authorAlexander Motin <mav@FreeBSD.org>
Tue, 17 Aug 2021 15:55:34 +0000 (11:55 -0400)
committerGitHub <noreply@github.com>
Tue, 17 Aug 2021 15:55:34 +0000 (09:55 -0600)
commitbb7ad5d326a0b3d7c327e9edd1bc4fcb9b72ff82
tree9c2889eedaa8fea069ad1fe9dd61629c5fa5f31b
parentcfe8e960f193d69a87693474de666025736f16aa
Optimize arc_l2c_only lists assertions

It is very expensive and not informative to call multilist_is_empty()
for each arc_change_state() on debug builds to check for impossible.
Instead implement special index function for arc_l2c_only->arcs_list,
multilists, panicking on any attempt to use it.

Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #12421
module/zfs/arc.c