Commit b8b0b0b
committed
cgroups: enhance support
Add a possibility to:
* Set a cgroup name for a service,
* Set a cgroup name prefix for services that don't have an explicit cgroup
name set by the previous feature.
This allows defining, for example, a root "services" cgroup, under which
children cgroups for particular services are kept,
* Add a service to a controller without needing to set any of its settings,
* Keep a service cgroup when it becomes empty (for example to keep between
service restarts some cgroup settings that were set outside OpenRC).
These functionalities allow configuration of a service cgroup name for v1
controllers and v2 (unified) hierarchy; the service name in the "openrc"
hierarchy is not affected by these settings.
The default values are set in a way so not to result in any change of
services cgroup behavior unless specifically configured in a different way
by an user.1 parent 44f5a72 commit b8b0b0b
2 files changed
Lines changed: 49 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
235 | 248 | | |
236 | 249 | | |
237 | 250 | | |
| |||
246 | 259 | | |
247 | 260 | | |
248 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
249 | 267 | | |
250 | 268 | | |
251 | 269 | | |
| |||
280 | 298 | | |
281 | 299 | | |
282 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
283 | 308 | | |
284 | 309 | | |
285 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
14 | 25 | | |
15 | 26 | | |
16 | 27 | | |
| |||
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
56 | | - | |
| 67 | + | |
57 | 68 | | |
58 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
59 | 77 | | |
60 | 78 | | |
61 | 79 | | |
| |||
82 | 100 | | |
83 | 101 | | |
84 | 102 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 103 | | |
91 | 104 | | |
92 | 105 | | |
| |||
156 | 169 | | |
157 | 170 | | |
158 | 171 | | |
| 172 | + | |
| 173 | + | |
159 | 174 | | |
160 | 175 | | |
161 | 176 | | |
162 | | - | |
| 177 | + | |
163 | 178 | | |
164 | 179 | | |
165 | 180 | | |
| |||
182 | 197 | | |
183 | 198 | | |
184 | 199 | | |
185 | | - | |
186 | | - | |
| 200 | + | |
| 201 | + | |
187 | 202 | | |
188 | 203 | | |
189 | 204 | | |
| |||
0 commit comments