diff options
author | Prakash Surya <[email protected]> | 2013-12-23 11:34:20 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-02-21 16:10:49 -0800 |
commit | 1e3cb67b53fba067fd7bf9a13d21b53de4626dc1 (patch) | |
tree | 1e5dbffa3ad72f423497873ccf89a623e11dc858 | |
parent | 624227854e619d1bf555445f3bc38730fb9278c4 (diff) |
Revert "Return -1 from arc_shrinker_func()"
This reverts commit c11a12bc3b2e5ee9a6bd74e26f1a396b6025fbd4.
Out of memory events were fixed by reverting this patch.
Signed-off-by: Prakash Surya <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #2110
-rw-r--r-- | module/zfs/arc.c | 4 |
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); |