]> git.proxmox.com Git - mirror_zfs.git/commit
Avoid 64bit division in multilist index functions
authorAlexander Motin <mav@FreeBSD.org>
Tue, 29 Jun 2021 12:59:14 +0000 (08:59 -0400)
committerGitHub <noreply@github.com>
Tue, 29 Jun 2021 12:59:14 +0000 (06:59 -0600)
commit5b7053a9a5a624603843a07ac0b360af64839e72
tree14f35686ae48cd8b876fc1a0741993e0a5c324d1
parentf20fb199e60722abc052b6034bddb6b83d870c99
Avoid 64bit division in multilist index functions

The number of sublists in a multilist is relatively small. We dont need
64 bits to calculate an index. 32 bits is sufficient and makes the
code more efficient.

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