mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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
This commit is contained in:
+1
-1
@@ -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)); \
|
||||
|
||||
Reference in New Issue
Block a user