rcu: Replace cpumask_weight with cpumask_empty where appropriate
authorYury Norov <yury.norov@gmail.com>
Sun, 23 Jan 2022 18:38:53 +0000 (10:38 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 14 Feb 2022 18:36:58 +0000 (10:36 -0800)
commit6a2c1d450a6a328027280a854019c55de989e14e
tree1925663bebf81e6f9681cf7e7be9730dc6f3cc98
parente6339d3b443c436c3b8f45eefec2212a8c07065d
rcu: Replace cpumask_weight with cpumask_empty where appropriate

In some places, RCU code calls cpumask_weight() to check if any bit of a
given cpumask is set. We can do it more efficiently with cpumask_empty()
because cpumask_empty() stops traversing the cpumask as soon as it finds
first set bit, while cpumask_weight() counts all bits unconditionally.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree_nocb.h
kernel/rcu/tree_plugin.h