Commit c6dfd72b authored by Peter Enderborg's avatar Peter Enderborg Committed by Paul E. McKenney

rcu: Stop shrinker loop

The count and scan can be separated in time, and there is a fair chance
that all work is already done when the scan starts, which might in turn
result in a needless retry.  This commit therefore avoids this retry by
returning SHRINK_STOP.
Reviewed-by: default avatarUladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: default avatarPeter Enderborg <peter.enderborg@sony.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent e40bb921
...@@ -3332,7 +3332,7 @@ kfree_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) ...@@ -3332,7 +3332,7 @@ kfree_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
break; break;
} }
return freed; return freed == 0 ? SHRINK_STOP : freed;
} }
static struct shrinker kfree_rcu_shrinker = { static struct shrinker kfree_rcu_shrinker = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment