Commit a1a0179
cgroup/cpuset: Consistently compute effective_xcpus in update_cpumasks_hier()
Since commit f62a5d3 ("cgroup/cpuset: Remove remote_partition_check()
& make update_cpumasks_hier() handle remote partition"), the
compute_effective_exclusive_cpumask() helper was extended to
strip exclusive CPUs from siblings when computing effective_xcpus
(cpuset.cpus.exclusive.effective). This helper was later renamed to
compute_excpus() in commit 86bbbd1 ("cpuset: Refactor exclusive
CPU mask computation logic").
This helper is supposed to be used consistently to compute
effective_xcpus. However, there is an exception within the callback
critical section in update_cpumasks_hier() when exclusive_cpus of a
valid partition root is empty. This can cause effective_xcpus value to
differ depending on where exactly it is last computed. Fix this by using
compute_excpus() in this case to give a consistent result.
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Chen Ridong <chenridong@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>1 parent 18bc242 commit a1a0179
1 file changed
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2168 | 2168 | | |
2169 | 2169 | | |
2170 | 2170 | | |
2171 | | - | |
2172 | | - | |
2173 | | - | |
2174 | 2171 | | |
2175 | | - | |
2176 | | - | |
| 2172 | + | |
| 2173 | + | |
2177 | 2174 | | |
2178 | | - | |
2179 | | - | |
2180 | | - | |
2181 | | - | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
2182 | 2178 | | |
2183 | 2179 | | |
2184 | 2180 | | |
| |||
0 commit comments