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

Merge branch 'for-4.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup

Pull cgroup fixes from Tejun Heo:
"The cgroup iteration update two years ago and the recent cpuset
restructuring introduced regressions in subset of cpuset
configurations. Three patches to fix them.

All are marked for -stable"

* 'for-4.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cpuset: Fix cpuset sched_relax_domain_level
cpuset: fix a warning when clearing configured masks in old hierarchy
cpuset: initialize effective masks when clone_children is enabled

+4 -5
+4 -5
kernel/cpuset.c
··· 548 548 549 549 rcu_read_lock(); 550 550 cpuset_for_each_descendant_pre(cp, pos_css, root_cs) { 551 - if (cp == root_cs) 552 - continue; 553 - 554 551 /* skip the whole subtree if @cp doesn't have any CPU */ 555 552 if (cpumask_empty(cp->cpus_allowed)) { 556 553 pos_css = css_rightmost_descendant(pos_css); ··· 870 873 * If it becomes empty, inherit the effective mask of the 871 874 * parent, which is guaranteed to have some CPUs. 872 875 */ 873 - if (cpumask_empty(new_cpus)) 876 + if (cgroup_on_dfl(cp->css.cgroup) && cpumask_empty(new_cpus)) 874 877 cpumask_copy(new_cpus, parent->effective_cpus); 875 878 876 879 /* Skip the whole subtree if the cpumask remains the same. */ ··· 1126 1129 * If it becomes empty, inherit the effective mask of the 1127 1130 * parent, which is guaranteed to have some MEMs. 1128 1131 */ 1129 - if (nodes_empty(*new_mems)) 1132 + if (cgroup_on_dfl(cp->css.cgroup) && nodes_empty(*new_mems)) 1130 1133 *new_mems = parent->effective_mems; 1131 1134 1132 1135 /* Skip the whole subtree if the nodemask remains the same. */ ··· 1976 1979 1977 1980 spin_lock_irq(&callback_lock); 1978 1981 cs->mems_allowed = parent->mems_allowed; 1982 + cs->effective_mems = parent->mems_allowed; 1979 1983 cpumask_copy(cs->cpus_allowed, parent->cpus_allowed); 1984 + cpumask_copy(cs->effective_cpus, parent->cpus_allowed); 1980 1985 spin_unlock_irq(&callback_lock); 1981 1986 out_unlock: 1982 1987 mutex_unlock(&cpuset_mutex);