diff options
author | Debabrata Banerjee <[email protected]> | 2017-03-15 19:30:29 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-05-02 15:50:02 -0400 |
commit | 1a31dcf53cd71c3c71db343fc4c9ab1dfa326d3f (patch) | |
tree | c9cbe60d3263e38401e8abe8e6a70e8ad42b786f /module | |
parent | 2e91c2fb1a47f98c2dc06725c284db16d852a618 (diff) |
Only wakeup waiters if we've actually done work
AKAMAI: zfs: CR 3695072
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')
-rw-r--r-- | module/zfs/arc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 8ef37cb4f..79b04f455 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -4434,17 +4434,17 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc) #else pages = btop(arc_evictable_memory()); #endif + /* + * We've shrunk what we can, wake up threads. + */ + cv_broadcast(&arc_reclaim_waiters_cv); + } else { arc_kmem_reap_now(); pages = SHRINK_STOP; } /* - * We've reaped what we can, wake up threads. - */ - cv_broadcast(&arc_reclaim_waiters_cv); - - /* * When direct reclaim is observed it usually indicates a rapid * increase in memory pressure. This occurs because the kswapd * threads were unable to asynchronously keep enough free memory |