]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Minor ARC optimizations
authorAlexander Motin <mav@FreeBSD.org>
Tue, 20 Jul 2021 14:13:21 +0000 (10:13 -0400)
committerTony Hutter <hutter2@llnl.gov>
Tue, 14 Sep 2021 19:39:48 +0000 (12:39 -0700)
commit6a49948c7309fd2bb391cf1897e70c75c30882e6
tree1477bc7f2922233067e102890de05ade925a5168
parent4dfb698aac43a6b8e04d0d54df438dc7a80a3f2c
Minor ARC optimizations

Remove unneeded global, practically constant, state pointer variables
(arc_anon, arc_mru, etc.), replacing them with macros of real state
variables addresses (&ARC_anon, &ARC_mru, etc.).

Change ARC_EVICT_ALL from -1ULL to UINT64_MAX, not requiring special
handling in inner loop of ARC reclamation.  Respectively change bytes
argument of arc_evict_state() from int64_t to uint64_t.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Closes #12348
include/sys/arc.h
include/sys/arc_impl.h
module/zfs/arc.c