Revert "Return -1 from arc_shrinker_func()"

This reverts commit c11a12bc3b.

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
This commit is contained in:
Prakash Surya 2013-12-23 11:34:20 -08:00 committed by Brian Behlendorf
parent 624227854e
commit 1e3cb67b53
1 changed files with 3 additions and 1 deletions

View File

@ -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);