FreeBSD/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
/*
 * Evict metadata buffers from the cache, such that arc_meta_used is
 * capped by the arc_meta_limit tunable.
 */
Evict metadata buffers from the cache, such that arc_meta_used is
capped by the arc_meta_limit tunable.
Evict metadata buffers from the cache such that arc_meta_used is capped by the arc_meta_limit tunable .
static uint64_t
arc_adjust_meta(void)
{
	uint64_t total_evicted = 0;
	int64_t target;
	target = MIN((int64_t)(arc_meta_used - arc_meta_limit),
	    (int64_t)(refcount_count(&arc_anon->arcs_size) +
	    refcount_count(&arc_mru->arcs_size) - arc_p));
	total_evicted += arc_adjust_impl(arc_mru, 0, target, ARC_BUFC_METADATA);
	target = MIN((int64_t)(arc_meta_used - arc_meta_limit),
	    (int64_t)(refcount_count(&arc_mfu->arcs_size) - (arc_c - arc_p)));
	total_evicted += arc_adjust_impl(arc_mfu, 0, target, ARC_BUFC_METADATA);
	return (total_evicted);
}
static uint64_t arc_adjust_meta ( void ) { uint64_t total_evicted = 0 ; int64_t target ; target = MIN ( ( int64_t ) ( arc_meta_used - arc_meta_limit ) , ( int64_t ) ( refcount_count ( & arc_anon -> arcs_size ) + refcount_count ( & arc_mru -> arcs_size ) - arc_p ) ) ; total_evicted += arc_adjust_impl ( arc_mru , 0 , target , ARC_BUFC_METADATA ) ; target = MIN ( ( int64_t ) ( arc_meta_used - arc_meta_limit ) , ( int64_t ) ( refcount_count ( & arc_mfu -> arcs_size ) - ( arc_c - arc_p ) ) ) ; total_evicted += arc_adjust_impl ( arc_mfu , 0 , target , ARC_BUFC_METADATA ) ; return ( total_evicted ) ; }
Evict metadata buffers from the cache, such that arc_meta_used is
 capped by the arc_meta_limit tunable.
Evict metadata buffers from the cache such that arc_meta_used is capped by the arc_meta_limit tunable .
/*
	 * If we're over the meta limit, we want to evict enough
	 * metadata to get back under the meta limit. We don't want to
	 * evict so much that we drop the MRU below arc_p, though. If
	 * we're over the meta limit more than we're over arc_p, we
	 * evict some from the MRU here, and some from the MFU below.
	 */ /*
	 * Similar to the above, we want to evict enough bytes to get us
	 * below the meta limit, but not so much as to drop us below the
	 * space alloted to the MFU (which is defined as arc_c - arc_p).
	 */