OSDN Git Service

rcu/tree: Count number of batched kfree_rcu() locklessly
authorJoel Fernandes (Google) <joel@joelfernandes.org>
Mon, 16 Mar 2020 16:32:28 +0000 (12:32 -0400)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 27 Apr 2020 18:02:50 +0000 (11:02 -0700)
commita6a82ce18ba443186545d3fefbee8b9419a859dc
treeab1829c8e55a433ebd52e812da3f34462a9bc39f
parent9154244c1ab6c9db4f1f25ac8f73bd46dba64287
rcu/tree: Count number of batched kfree_rcu() locklessly

We can relax the correctness of counting of number of queued objects in
favor of not hurting performance, by locklessly sampling per-cpu
counters. This should be Ok since under high memory pressure, it should not
matter if we are off by a few objects while counting. The shrinker will
still do the reclaim.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
[ paulmck: Remove unused "flags" variable. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c