Lines Matching refs:children
236 int (*validate)(const struct cpu_hogger *children, int num_children))
240 struct cpu_hogger children[3] = {NULL};
252 for (i = 0; i < ARRAY_SIZE(children); i++) {
253 children[i].cgroup = cg_name_indexed(parent, "cpucg_child", i);
254 if (!children[i].cgroup)
257 if (cg_create(children[i].cgroup))
260 if (cg_write_numeric(children[i].cgroup, "cpu.weight",
265 for (i = 0; i < ARRAY_SIZE(children); i++) {
266 pid_t pid = spawn_child(&children[i]);
269 children[i].pid = pid;
272 for (i = 0; i < ARRAY_SIZE(children); i++) {
275 waitpid(children[i].pid, &retcode, 0);
282 for (i = 0; i < ARRAY_SIZE(children); i++)
283 children[i].usage = cg_read_key_long(children[i].cgroup,
286 if (validate(children, ARRAY_SIZE(children)))
291 for (i = 0; i < ARRAY_SIZE(children); i++) {
292 cg_destroy(children[i].cgroup);
293 free(children[i].cgroup);
321 overprovision_validate(const struct cpu_hogger *children, int num_children)
328 if (children[i + 1].usage <= children[i].usage)
331 delta = children[i + 1].usage - children[i].usage;
332 if (!values_close(delta, children[0].usage, 35))
352 * Once all of the children have exited, we verify that each child cgroup
367 underprovision_validate(const struct cpu_hogger *children, int num_children)
372 if (!values_close(children[i + 1].usage, children[0].usage, 15))
392 * Once all of the children have exited, we verify that each child cgroup