aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/zfs/arc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 68496783d..ad2e8a92d 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -2583,8 +2583,10 @@ __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;
}
/*
@@ -2604,7 +2606,7 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc)
mutex_exit(&arc_reclaim_thr_lock);
- return (-1);
+ return (pages);
}
SPL_SHRINKER_CALLBACK_WRAPPER(arc_shrinker_func);