From: Rich Ercolani Date: Wed, 5 Sep 2018 05:15:14 +0000 (-0400) Subject: Added recalculation of ARC stats mid-eviction X-Git-Tag: zfs-0.8.0-rc1~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0405eeea6a8d142171ce352d3dac5f08cd6f70f0;p=zfs 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 --- diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 727b21f3f..5e53f9879 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 *