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

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

Pull cgroup fixes from Tejun Heo:

- "cgroup_disable=" boot param was being applied too late confusing
some subsystems. Fix it by moving application to __setup() time.

- Comment spelling fixes. Included here to lower the chance of trivial
future merge conflicts.

* 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup: fix spelling mistakes
cgroup: disable controllers at parse time

+17 -20
+3 -3
include/linux/cgroup-defs.h
··· 232 232 struct list_head task_iters; 233 233 234 234 /* 235 - * On the default hierarhcy, ->subsys[ssid] may point to a css 235 + * On the default hierarchy, ->subsys[ssid] may point to a css 236 236 * attached to an ancestor instead of the cgroup this css_set is 237 237 * associated with. The following node is anchored at 238 238 * ->subsys[ssid]->cgroup->e_csets[ssid] and provides a way to ··· 668 668 */ 669 669 bool threaded:1; 670 670 671 - /* the following two fields are initialized automtically during boot */ 671 + /* the following two fields are initialized automatically during boot */ 672 672 int id; 673 673 const char *name; 674 674 ··· 757 757 * sock_cgroup_data overloads (prioidx, classid) and the cgroup pointer. 758 758 * On boot, sock_cgroup_data records the cgroup that the sock was created 759 759 * in so that cgroup2 matches can be made; however, once either net_prio or 760 - * net_cls starts being used, the area is overriden to carry prioidx and/or 760 + * net_cls starts being used, the area is overridden to carry prioidx and/or 761 761 * classid. The two modes are distinguished by whether the lowest bit is 762 762 * set. Clear bit indicates cgroup pointer while set bit prioidx and 763 763 * classid.
+1 -1
include/linux/cgroup.h
··· 32 32 #ifdef CONFIG_CGROUPS 33 33 34 34 /* 35 - * All weight knobs on the default hierarhcy should use the following min, 35 + * All weight knobs on the default hierarchy should use the following min, 36 36 * default and max values. The default value is the logarithmic center of 37 37 * MIN and MAX and allows 100x to be expressed in both directions. 38 38 */
+1 -1
kernel/cgroup/cgroup-v1.c
··· 1001 1001 ctx->subsys_mask &= enabled; 1002 1002 1003 1003 /* 1004 - * In absense of 'none', 'name=' or subsystem name options, 1004 + * In absence of 'none', 'name=' and subsystem name options, 1005 1005 * let's default to 'all'. 1006 1006 */ 1007 1007 if (!ctx->subsys_mask && !ctx->none && !ctx->name)
+9 -12
kernel/cgroup/cgroup.c
··· 468 468 * @cgrp: the cgroup of interest 469 469 * @ss: the subsystem of interest 470 470 * 471 - * Find and get @cgrp's css assocaited with @ss. If the css doesn't exist 471 + * Find and get @cgrp's css associated with @ss. If the css doesn't exist 472 472 * or is offline, %NULL is returned. 473 473 */ 474 474 static struct cgroup_subsys_state *cgroup_tryget_css(struct cgroup *cgrp, ··· 1633 1633 1634 1634 /** 1635 1635 * css_clear_dir - remove subsys files in a cgroup directory 1636 - * @css: taget css 1636 + * @css: target css 1637 1637 */ 1638 1638 static void css_clear_dir(struct cgroup_subsys_state *css) 1639 1639 { ··· 5350 5350 /* 5351 5351 * This is called when the refcnt of a css is confirmed to be killed. 5352 5352 * css_tryget_online() is now guaranteed to fail. Tell the subsystem to 5353 - * initate destruction and put the css ref from kill_css(). 5353 + * initiate destruction and put the css ref from kill_css(). 5354 5354 */ 5355 5355 static void css_killed_work_fn(struct work_struct *work) 5356 5356 { ··· 5634 5634 return 0; 5635 5635 } 5636 5636 5637 - static u16 cgroup_disable_mask __initdata; 5638 - 5639 5637 /** 5640 5638 * cgroup_init - cgroup initialization 5641 5639 * ··· 5692 5694 * disabled flag and cftype registration needs kmalloc, 5693 5695 * both of which aren't available during early_init. 5694 5696 */ 5695 - if (cgroup_disable_mask & (1 << ssid)) { 5696 - static_branch_disable(cgroup_subsys_enabled_key[ssid]); 5697 - printk(KERN_INFO "Disabling %s control group subsystem\n", 5698 - ss->name); 5697 + if (!cgroup_ssid_enabled(ssid)) 5699 5698 continue; 5700 - } 5701 5699 5702 5700 if (cgroup1_ssid_disabled(ssid)) 5703 5701 printk(KERN_INFO "Disabling %s control group subsystem in v1 mounts\n", ··· 6052 6058 * @kargs: the arguments passed to create the child process 6053 6059 * 6054 6060 * This calls the cancel_fork() callbacks if a fork failed *after* 6055 - * cgroup_can_fork() succeded and cleans up references we took to 6061 + * cgroup_can_fork() succeeded and cleans up references we took to 6056 6062 * prepare a new css_set for the child process in cgroup_can_fork(). 6057 6063 */ 6058 6064 void cgroup_cancel_fork(struct task_struct *child, ··· 6208 6214 if (strcmp(token, ss->name) && 6209 6215 strcmp(token, ss->legacy_name)) 6210 6216 continue; 6211 - cgroup_disable_mask |= 1 << i; 6217 + 6218 + static_branch_disable(cgroup_subsys_enabled_key[i]); 6219 + pr_info("Disabling %s control group subsystem\n", 6220 + ss->name); 6212 6221 } 6213 6222 } 6214 6223 return 1;
+1 -1
kernel/cgroup/cpuset.c
··· 3376 3376 } 3377 3377 3378 3378 /** 3379 - * cpuset_nodemask_valid_mems_allowed - check nodemask vs. curremt mems_allowed 3379 + * cpuset_nodemask_valid_mems_allowed - check nodemask vs. current mems_allowed 3380 3380 * @nodemask: the nodemask to be checked 3381 3381 * 3382 3382 * Are any of the nodes in the nodemask allowed in current->mems_allowed?
+1 -1
kernel/cgroup/rdma.c
··· 244 244 * This function follows charging resource in hierarchical way. 245 245 * It will fail if the charge would cause the new value to exceed the 246 246 * hierarchical limit. 247 - * Returns 0 if the charge succeded, otherwise -EAGAIN, -ENOMEM or -EINVAL. 247 + * Returns 0 if the charge succeeded, otherwise -EAGAIN, -ENOMEM or -EINVAL. 248 248 * Returns pointer to rdmacg for this resource when charging is successful. 249 249 * 250 250 * Charger needs to account resources on two criteria.
+1 -1
kernel/cgroup/rstat.c
··· 75 75 * @root: root of the tree to traversal 76 76 * @cpu: target cpu 77 77 * 78 - * Walks the udpated rstat_cpu tree on @cpu from @root. %NULL @pos starts 78 + * Walks the updated rstat_cpu tree on @cpu from @root. %NULL @pos starts 79 79 * the traversal and %NULL return indicates the end. During traversal, 80 80 * each returned cgroup is unlinked from the tree. Must be called with the 81 81 * matching cgroup_rstat_cpu_lock held.