From 07e255463c529c3594fc9e42d410f33c00de096b Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 4 Aug 2013 19:13:15 -0400 Subject: [PATCH] Return -1 from arc_shrinker_func() This is analogous to SPL commit zfsonlinux/spl@b9b3715. While we don't have clear evidence of systems getting caught here indefinately like in the SPL this ensures that it will never happen. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #1579 --- module/zfs/arc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module/zfs/arc.c b/module/zfs/arc.c index f000281a2706..f9cd3fb28de0 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -2377,10 +2377,8 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc) */ if (pages > 0) { arc_kmem_reap_now(ARC_RECLAIM_AGGR, ptob(sc->nr_to_scan)); - pages = btop(arc_evictable_memory()); } else { arc_kmem_reap_now(ARC_RECLAIM_CONS, ptob(sc->nr_to_scan)); - pages = -1; } /* @@ -2400,7 +2398,7 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc) mutex_exit(&arc_reclaim_thr_lock); - return (pages); + return (-1); } SPL_SHRINKER_CALLBACK_WRAPPER(arc_shrinker_func);