From 1a31dcf53cd71c3c71db343fc4c9ab1dfa326d3f Mon Sep 17 00:00:00 2001 From: Debabrata Banerjee Date: Wed, 15 Mar 2017 19:30:29 -0400 Subject: [PATCH] Only wakeup waiters if we've actually done work AKAMAI: zfs: CR 3695072 Reviewed-by: Tim Chase Reviewed-by: Richard Yao Reviewed-by: Brian Behlendorf Signed-off-by: Debabrata Banerjee Issue #6035 --- module/zfs/arc.c | 10 +++++----- 1 file 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,16 +4434,16 @@ __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 -- 2.40.0