Do not stop kernel shrinker on lock contention
Lock contention, by itself, shouldn't indicate a stop condition to the kernel's slab shrinker. Doing so can cause stalls when the kernel is trying to free large parts of the cache such as is done by drop_caches Also, perhaps arc_reclaim_lock should be a spinlock, and this code eliminated. AKAMAI: zfs: CR 3593801 Reviewed-by: Tim Chase <tim@chase2k.com> Reviewed-by: Richard Yao <ryao@gentoo.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com> Issue #6035
This commit is contained in:
parent
b855550c33
commit
2e91c2fb1a
|
@ -4416,7 +4416,7 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc)
|
|||
/* Reclaim in progress */
|
||||
if (mutex_tryenter(&arc_reclaim_lock) == 0) {
|
||||
ARCSTAT_INCR(arcstat_need_free, ptob(sc->nr_to_scan));
|
||||
return (SHRINK_STOP);
|
||||
return (0);
|
||||
}
|
||||
|
||||
mutex_exit(&arc_reclaim_lock);
|
||||
|
|
Loading…
Reference in New Issue