Skip to content

Commit

Permalink
Only wakeup waiters if we've actually done work
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dbavatar authored and behlendorf committed May 2, 2017
1 parent 2e91c2f commit 1a31dcf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a31dcf

Please sign in to comment.