diff options
author | Peter Enderborg <peter.enderborg@sony.com> | 2020-06-04 12:23:20 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-06-29 20:58:51 +0200 |
commit | c6dfd72b7a3b70a2054db0f73245ea2f762a8452 (patch) | |
tree | de84fe185c47b0945e168f5ee0220699289ed060 /kernel/rcu/tree.c | |
parent | rcu: Replace 1 with true (diff) | |
download | linux-c6dfd72b7a3b70a2054db0f73245ea2f762a8452.tar.xz linux-c6dfd72b7a3b70a2054db0f73245ea2f762a8452.zip |
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.c | 2 |
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 = { |