summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPeter Enderborg <peter.enderborg@sony.com>2020-06-04 12:23:20 +0200
committerPaul E. McKenney <paulmck@kernel.org>2020-06-29 11:58:51 -0700
commitc6dfd72b7a3b70a2054db0f73245ea2f762a8452 (patch)
treede84fe185c47b0945e168f5ee0220699289ed060 /kernel/rcu/tree.c
parente40bb921119814c6f746891af9cd37eccda616a4 (diff)
downloadlinux-c6dfd72b7a3b70a2054db0f73245ea2f762a8452.tar.bz2
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: Uladzislau Rezki (Sony) <urezki@gmail.com> Signed-off-by: Peter Enderborg <peter.enderborg@sony.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index d17e5a08bf43..c8196fab563c 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3332,7 +3332,7 @@ kfree_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
break;
}
- return freed;
+ return freed == 0 ? SHRINK_STOP : freed;
}
static struct shrinker kfree_rcu_shrinker = {