Commit c297f67
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 0f8fe2a commit c297f67
2 files changed
Lines changed: 53 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
236 | 249 | | |
237 | 250 | | |
238 | 251 | | |
| |||
247 | 260 | | |
248 | 261 | | |
249 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
250 | 268 | | |
251 | 269 | | |
252 | 270 | | |
| |||
281 | 299 | | |
282 | 300 | | |
283 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
284 | 309 | | |
285 | 310 | | |
286 | 311 | | |
| |||
| 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 | | |
| |||
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
38 | | - | |
| 49 | + | |
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
| |||
49 | 60 | | |
50 | 61 | | |
51 | 62 | | |
52 | | - | |
53 | | - | |
| 63 | + | |
| 64 | + | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
| |||
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
64 | | - | |
| 75 | + | |
65 | 76 | | |
66 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
67 | 85 | | |
68 | 86 | | |
69 | 87 | | |
| |||
90 | 108 | | |
91 | 109 | | |
92 | 110 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 111 | | |
99 | 112 | | |
100 | 113 | | |
| |||
164 | 177 | | |
165 | 178 | | |
166 | 179 | | |
| 180 | + | |
| 181 | + | |
167 | 182 | | |
168 | 183 | | |
169 | 184 | | |
170 | | - | |
| 185 | + | |
171 | 186 | | |
172 | 187 | | |
173 | 188 | | |
| |||
191 | 206 | | |
192 | 207 | | |
193 | 208 | | |
194 | | - | |
195 | | - | |
| 209 | + | |
| 210 | + | |
196 | 211 | | |
197 | 212 | | |
198 | 213 | | |
| |||
210 | 225 | | |
211 | 226 | | |
212 | 227 | | |
213 | | - | |
| 228 | + | |
214 | 229 | | |
215 | 230 | | |
216 | 231 | | |
| |||
0 commit comments