int zfs_arc_grow_retry = 0;
int zfs_arc_shrink_shift = 0;
int zfs_arc_p_min_shift = 0;
+int zfs_arc_reduce_dnlc_percent = 0;
/*
* Note that buffers can be in one of 6 states:
kmem_cache_t *prev_data_cache = NULL;
extern kmem_cache_t *zio_buf_cache[];
extern kmem_cache_t *zio_data_buf_cache[];
-
#ifdef _KERNEL
- if (arc_meta_used >= arc_meta_limit) {
+ int retry = 0;
+
+ while ((arc_meta_used >= arc_meta_limit) && (retry < 10)) {
/*
* We are exceeding our meta-data cache limit.
* Purge some DNLC entries to release holds on meta-data.
*/
dnlc_reduce_cache((void *)(uintptr_t)arc_reduce_dnlc_percent);
+ retry++;
}
#if defined(__i386)
/*
arc_no_grow = FALSE;
}
+ /* Keep meta data usage within limits */
+ if (arc_meta_used >= arc_meta_limit)
+ arc_kmem_reap_now(ARC_RECLAIM_CONS);
+
arc_adjust();
if (arc_eviction_list != NULL)
if (zfs_arc_p_min_shift > 0)
arc_p_min_shift = zfs_arc_p_min_shift;
+ if (zfs_arc_reduce_dnlc_percent > 0)
+ arc_reduce_dnlc_percent = zfs_arc_reduce_dnlc_percent;
+
/* if kmem_flags are set, lets try to use less memory */
if (kmem_debugging())
arc_c = arc_c / 2;
module_param(zfs_arc_meta_limit, ulong, 0644);
MODULE_PARM_DESC(zfs_arc_meta_limit, "Meta limit for arc size");
+
+module_param(arc_reduce_dnlc_percent, uint, 0644);
+MODULE_PARM_DESC(arc_reduce_dnlc_percent, "Meta reclaim percentage");
#endif