cgroup/cpuset: Make cpuset_attach_task() skip subpartitions CPUs for top_cpuset
ANBZ: #13018
commit 7e27cb6ad4
upstream
It is found that attaching a task to the top_cpuset does not currently
ignore CPUs allocated to subpartitions in cpuset_attach_task(). So the
code is changed to fix that.
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
[accommodate the 5.10 codebase]
Signed-off-by: Yi Tao <escape@linux.alibaba.com>
Reviewed-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/4343
This commit is contained in:
parent
2b6fa0b3ca
commit
63c90de544
|
@ -2307,7 +2307,8 @@ static void cpuset_attach(struct cgroup_taskset *tset)
|
|||
|
||||
/* prepare for attach */
|
||||
if (cs == &top_cpuset) {
|
||||
cpumask_copy(cpus_attach, cpu_possible_mask);
|
||||
cpumask_andnot(cpus_attach, cpu_possible_mask,
|
||||
cs->subparts_cpus);
|
||||
wilds_cpus_allowed(cpus_attach);
|
||||
} else
|
||||
guarantee_online_cpus(cs, cpus_attach);
|
||||
|
|
Loading…
Reference in New Issue