From 0405eeea6a8d142171ce352d3dac5f08cd6f70f0 Mon Sep 17 00:00:00 2001 From: Rich Ercolani Date: Wed, 5 Sep 2018 01:15:14 -0400 Subject: [PATCH] Added recalculation of ARC stats mid-eviction Re-adds a recalculation step for the ARC stats after the MRU eviction so that we don't pathologically attempt to evict the MFU. Reviewed-by: Richard Elling Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Authored-by: Mark Johnston Signed-off-by: Rich Ercolani Closes #7855 --- module/zfs/arc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 727b21f3fc..5e53f98796 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -4638,6 +4638,13 @@ arc_adjust(void) arc_adjust_impl(arc_mru, 0, target, ARC_BUFC_METADATA); } + /* + * Re-sum ARC stats after the first round of evictions. + */ + asize = aggsum_value(&arc_size); + ameta = aggsum_value(&arc_meta_used); + + /* * Adjust MFU size *