Skip to content

Commit

Permalink
Return -1 from arc_shrinker_func()
Browse files Browse the repository at this point in the history
This is analogous to SPL commit openzfs/spl@b9b3715.  While
we don't have clear evidence of systems getting caught here
indefinately like in the SPL this ensures that it will never
happen.

Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#1579
  • Loading branch information
ryao authored and unya committed Dec 13, 2013
1 parent 939cce8 commit 07e2554
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2377,10 +2377,8 @@ __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 @@ -2400,7 +2398,7 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc)

mutex_exit(&arc_reclaim_thr_lock);

return (pages);
return (-1);
}
SPL_SHRINKER_CALLBACK_WRAPPER(arc_shrinker_func);

Expand Down

0 comments on commit 07e2554

Please sign in to comment.