rcu: Avoid modifying mask_ofl_ipi in sync_rcu_exp_select_node_cpus()
authorBoqun Feng <boqun.feng@gmail.com>
Tue, 8 Oct 2019 05:01:40 +0000 (13:01 +0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 9 Dec 2019 20:24:56 +0000 (12:24 -0800)
commit9f08cf088676c12a5b53bd5a29cf04f00c787b5d
tree41e8ee93dc186a569b07f6f0ee0472f174c1edf0
parent15c7c972cd26d89a26788e609c53b5a465324a6c
rcu: Avoid modifying mask_ofl_ipi in sync_rcu_exp_select_node_cpus()

The "mask_ofl_ipi" is used to track which CPUs get IPIed, however
in the IPI sending loop, "mask_ofl_ipi" along with another variable
"mask_ofl_test" might also get modified to record which CPUs' quiesent
states must be reported by the sync_rcu_exp_select_node_cpus() at
the end of sync_rcu_exp_select_node_cpus().  This overlap of roles
can be confusing, so this patch cleans things a little by using
"mask_ofl_ipi" solely for determining which CPUs must be IPIed  and
"mask_ofl_test" for solely determining on behalf of  which CPUs
sync_rcu_exp_select_node_cpus() must report a quiscent state.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Acked-by: Marco Elver <elver@google.com>
kernel/rcu/tree_exp.h