Commit f6d635a
committed
cgroup: implement cgroup_subsys->implicit_on_dfl
Some controllers, perf_event for now and possibly freezer in the
future, don't really make sense to control explicitly through
"cgroup.subtree_control". For example, the primary role of perf_event
is identifying the cgroups of tasks; however, because the controller
also keeps a small amount of state per cgroup, it can't be replaced
with simple cgroup membership tests.
This patch implements cgroup_subsys->implicit_on_dfl flag. When set,
the controller is implicitly enabled on all cgroups on the v2
hierarchy so that utility type controllers such as perf_event can be
enabled and function transparently.
An implicit controller doesn't show up in "cgroup.controllers" or
"cgroup.subtree_control", is exempt from no internal process rule and
can be stolen from the default hierarchy even if there are non-root
csses.
v2: Reimplemented on top of the recent updates to css handling and
subsystem rebinding. Rebinding implicit subsystems is now a
simple matter of exempting it from the busy subsystem check.
Signed-off-by: Tejun Heo <tj@kernel.org>1 parent e485798 commit f6d635a
2 files changed
+44
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
453 | 466 | | |
454 | 467 | | |
455 | 468 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
359 | 362 | | |
360 | 363 | | |
361 | 364 | | |
362 | | - | |
363 | | - | |
| 365 | + | |
| 366 | + | |
364 | 367 | | |
365 | 368 | | |
366 | 369 | | |
| |||
1327 | 1330 | | |
1328 | 1331 | | |
1329 | 1332 | | |
| 1333 | + | |
| 1334 | + | |
1330 | 1335 | | |
1331 | 1336 | | |
1332 | 1337 | | |
| |||
1512 | 1517 | | |
1513 | 1518 | | |
1514 | 1519 | | |
1515 | | - | |
1516 | | - | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
1517 | 1527 | | |
1518 | 1528 | | |
1519 | 1529 | | |
| |||
3039 | 3049 | | |
3040 | 3050 | | |
3041 | 3051 | | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
| 3055 | + | |
| 3056 | + | |
| 3057 | + | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
| 3061 | + | |
| 3062 | + | |
| 3063 | + | |
3042 | 3064 | | |
3043 | 3065 | | |
3044 | 3066 | | |
| |||
3074 | 3096 | | |
3075 | 3097 | | |
3076 | 3098 | | |
3077 | | - | |
| 3099 | + | |
3078 | 3100 | | |
3079 | 3101 | | |
3080 | 3102 | | |
| |||
3117 | 3139 | | |
3118 | 3140 | | |
3119 | 3141 | | |
3120 | | - | |
| 3142 | + | |
3121 | 3143 | | |
3122 | 3144 | | |
3123 | 3145 | | |
| |||
5455 | 5477 | | |
5456 | 5478 | | |
5457 | 5479 | | |
5458 | | - | |
| 5480 | + | |
| 5481 | + | |
| 5482 | + | |
5459 | 5483 | | |
5460 | 5484 | | |
5461 | 5485 | | |
| |||
0 commit comments