Skip to content

Commit

Permalink
Revert "Return -1 from arc_shrinker_func()"
Browse files Browse the repository at this point in the history
This reverts commit c11a12b.

Out of memory events were fixed by reverting this patch.

Signed-off-by: Prakash Surya <[email protected]>
  • Loading branch information
Prakash Surya committed Feb 12, 2014
1 parent f5ee929 commit cd661cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand All @@ -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);

Expand Down

0 comments on commit cd661cd

Please sign in to comment.