When the boost kthreads are created on systems with nohz_full CPUs, the cpus_allowed_ptr is set to housekeeping_cpumask(HK_FLAG_KTHREAD). However, when the rcu_boost_kthread_setaffinity() is called, the original affinity will be changed and these kthreads can subsequently run on nohz_full CPUs. This commit makes rcu_boost_kthread_setaffinity() restrict these boost kthreads to housekeeping CPUs.
Showing the changes to kernel (1 of 1 file). Show all
Unified · Split
| @@ -1203,8 +1203,9 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu) · 1202 unmodified lines | ||
| 1203 | 1203 | if ((mask & leaf_node_cpu_bit(rnp, cpu)) && |
| 1204 | 1204 | cpu != outgoingcpu) |
| 1205 | 1205 | cpumask_set_cpu(cpu, cm); |
| 1206 | + cpumask_and(cm, cm, housekeeping_cpumask(HK_FLAG_RCU)); | |
| 1206 | 1207 | if (cpumask_weight(cm) == 0) |
| 1207 | − cpumask_setall(cm); | |
| 1208 | + cpumask_copy(cm, housekeeping_cpumask(HK_FLAG_RCU)); | |
| 1208 | 1209 | set_cpus_allowed_ptr(t, cm); |
| 1209 | 1210 | free_cpumask_var(cm); |
| 1210 | 1211 | } |