diff options
author | Alexander Motin <[email protected]> | 2021-07-20 10:13:21 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-20 08:13:21 -0600 |
commit | 8172df643b6cdc7fe233b18c8d8e9b29455ae9f1 (patch) | |
tree | 2422fed87acd136b7b63b708f5d06ad0e1b670b9 /include/sys/arc.h | |
parent | e04210035eba31c40978658b8d2fa7f823a9f7de (diff) |
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 <[email protected]>
Reviewed-by: Mark Maybee <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Closes #12348
Diffstat (limited to 'include/sys/arc.h')
-rw-r--r-- | include/sys/arc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/arc.h b/include/sys/arc.h index f58fa53b6..ef07a657f 100644 --- a/include/sys/arc.h +++ b/include/sys/arc.h @@ -44,7 +44,7 @@ extern "C" { * Used by arc_flush() to inform arc_evict_state() that it should evict * all available buffers from the arc state being passed in. */ -#define ARC_EVICT_ALL -1ULL +#define ARC_EVICT_ALL UINT64_MAX #define HDR_SET_LSIZE(hdr, x) do { \ ASSERT(IS_P2ALIGNED(x, 1U << SPA_MINBLOCKSHIFT)); \ |