mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
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:
parent
624227854e
commit
1e3cb67b53
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user