diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2018-09-11 08:57:48 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.ibm.com> | 2018-11-11 11:23:01 -0800 |
commit | 9cac83a57e99e4692315b7a91a81bab787961d97 (patch) | |
tree | 441acd0c2bbde270c183a383b7646804aa36fef5 /include/uapi | |
parent | 651022382c7f8da46cb4872a545ee1da6d097d2a (diff) | |
download | linux-9cac83a57e99e4692315b7a91a81bab787961d97.tar.bz2 |
rcu: Stop expedited grace periods from relying on stop-machine
The CPU-selection code in sync_rcu_exp_select_cpus() disables preemption
to prevent the cpu_online_mask from changing. However, this relies on
the stop-machine mechanism in the CPU-hotplug offline code, which is not
desirable (it would be good to someday remove the stop-machine mechanism).
This commit therefore instead uses the relevant leaf rcu_node structure's
->ffmask, which has a bit set for all CPUs that are fully functional.
A given CPU's bit is cleared very early during offline processing by
rcutree_offline_cpu() and set very late during online processing by
rcutree_online_cpu(). Therefore, if a CPU's bit is set in this mask, and
preemption is disabled, we have to be before the synchronize_sched() in
the CPU-hotplug offline code, which means that the CPU is guaranteed to be
workqueue-ready throughout the duration of the enclosing preempt_disable()
region of code.
This also has the side-effect of using WORK_CPU_UNBOUND if all the CPUs for
this leaf rcu_node structure are offline, which is an acceptable difference
in behavior.
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions