Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cgroup/cpuset: remove child_ecpus_count

The child_ecpus_count variable was previously used to update
sibling cpumask when parent's effective_cpus is updated. However, it became
obsolete after commit e2ffe502ba45 ("cgroup/cpuset: Add
cpuset.cpus.exclusive for v2"). It should be removed.

tj: Restored {} for style consistency.

Signed-off-by: Chen Ridong <chenridong@huawei.com>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Chen Ridong and committed by
Tejun Heo
d6326047 8400291e

+3 -19
+3 -19
kernel/cgroup/cpuset.c
··· 188 188 /* 189 189 * Default hierarchy only: 190 190 * use_parent_ecpus - set if using parent's effective_cpus 191 - * child_ecpus_count - # of children with use_parent_ecpus set 192 191 */ 193 192 int use_parent_ecpus; 194 - int child_ecpus_count; 195 193 196 194 /* 197 195 * number of SCHED_DEADLINE tasks attached to this cpuset, so that we ··· 1510 1512 if (!cpumask_and(cs->effective_cpus, 1511 1513 parent->effective_cpus, cs->cpus_allowed)) { 1512 1514 cs->use_parent_ecpus = true; 1513 - parent->child_ecpus_count++; 1514 1515 cpumask_copy(cs->effective_cpus, parent->effective_cpus); 1515 1516 } 1516 1517 } ··· 1685 1688 spin_lock_irq(&callback_lock); 1686 1689 isolcpus_updated = partition_xcpus_add(new_prs, NULL, tmp->new_cpus); 1687 1690 list_add(&cs->remote_sibling, &remote_children); 1688 - if (cs->use_parent_ecpus) { 1689 - struct cpuset *parent = parent_cs(cs); 1690 - 1691 + if (cs->use_parent_ecpus) 1691 1692 cs->use_parent_ecpus = false; 1692 - parent->child_ecpus_count--; 1693 - } 1694 1693 spin_unlock_irq(&callback_lock); 1695 1694 update_unbound_workqueue_cpumask(isolcpus_updated); 1696 1695 ··· 2311 2318 */ 2312 2319 if (is_in_v2_mode() && !remote && cpumask_empty(tmp->new_cpus)) { 2313 2320 cpumask_copy(tmp->new_cpus, parent->effective_cpus); 2314 - if (!cp->use_parent_ecpus) { 2321 + if (!cp->use_parent_ecpus) 2315 2322 cp->use_parent_ecpus = true; 2316 - parent->child_ecpus_count++; 2317 - } 2318 2323 } else if (cp->use_parent_ecpus) { 2319 2324 cp->use_parent_ecpus = false; 2320 - WARN_ON_ONCE(!parent->child_ecpus_count); 2321 - parent->child_ecpus_count--; 2322 2325 } 2323 2326 2324 2327 if (remote) ··· 4128 4139 cpumask_copy(cs->effective_cpus, parent->effective_cpus); 4129 4140 cs->effective_mems = parent->effective_mems; 4130 4141 cs->use_parent_ecpus = true; 4131 - parent->child_ecpus_count++; 4132 4142 } 4133 4143 spin_unlock_irq(&callback_lock); 4134 4144 ··· 4193 4205 is_sched_load_balance(cs)) 4194 4206 update_flag(CS_SCHED_LOAD_BALANCE, cs, 0); 4195 4207 4196 - if (cs->use_parent_ecpus) { 4197 - struct cpuset *parent = parent_cs(cs); 4198 - 4208 + if (cs->use_parent_ecpus) 4199 4209 cs->use_parent_ecpus = false; 4200 - parent->child_ecpus_count--; 4201 - } 4202 4210 4203 4211 cpuset_dec(); 4204 4212 clear_bit(CS_ONLINE, &cs->flags);