diff options
author | Zhen Lei <thunder.leizhen@huawei.com> | 2022-09-13 06:00:36 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2022-10-19 01:00:36 +0300 |
commit | f1ffec1ea30fdd4c101c78af2be376d8c1cf46b7 (patch) | |
tree | 5ab83be166417eafff8f359c85bfa47dfbac064c /kernel/rcu/tree.h | |
parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) | |
download | linux-f1ffec1ea30fdd4c101c78af2be376d8c1cf46b7.tar.xz |
rcu: Simplify rcu_init_nohz() cpumask handling
In kernels built with either CONFIG_RCU_NOCB_CPU_DEFAULT_ALL=y or
CONFIG_NO_HZ_FULL=y, additional CPUs must be added to rcu_nocb_mask.
Except that kernels booted without the rcu_nocbs= will not have
allocated rcu_nocb_mask. And the current rcu_init_nohz() function uses
its need_rcu_nocb_mask and offload_all local variables to track the
rcu_nocb and nohz_full state.
But there is a much simpler approach, namely creating a cpumask pointer
to track the default and then using cpumask_available() to check the
rcu_nocb_mask state. This commit takes this approach, thereby simplifying
and shortening the rcu_init_nohz() function.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree.h')
0 files changed, 0 insertions, 0 deletions