diff options
author | Debabrata Banerjee <[email protected]> | 2017-03-15 18:50:32 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-05-02 15:49:48 -0400 |
commit | 2e91c2fb1a47f98c2dc06725c284db16d852a618 (patch) | |
tree | 4b8c727e048f0b508982cefe2911e16bd3d477b3 /module/zfs | |
parent | b855550c336c04b2bde85d9ffbd893b196fdd7b5 (diff) |
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 <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Debabrata Banerjee <[email protected]>
Issue #6035
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/arc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index b18c7a586..8ef37cb4f 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -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); |