This reverts commit
c11a12bc3b2e5ee9a6bd74e26f1a396b6025fbd4.
Out of memory events were fixed by reverting this patch.
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2110
*/
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;
}
/*
mutex_exit(&arc_reclaim_thr_lock);
- return (-1);
+ return (pages);
}
SPL_SHRINKER_CALLBACK_WRAPPER(arc_shrinker_func);