Lines Matching defs:cgroup

23 	char *cgroup;
51 if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
61 if (cg_read_strstr(child, "cgroup.controllers", "cpu"))
79 if (!cg_read_strstr(child2, "cgroup.controllers", "cpu"))
131 static int hog_cpus_timed(const char *cgroup, void *arg)
180 * Creates a cpu cgroup, burns a CPU for a few quanta, and verifies that
249 if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
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",
283 children[i].usage = cg_read_key_long(children[i].cgroup,
292 cg_destroy(children[i].cgroup);
293 free(children[i].cgroup);
312 return cg_run_nowait(child->cgroup, hog_cpus_timed, (void *)&param);
348 * A separate process is then created for each child cgroup which spawns as
352 * Once all of the children have exited, we verify that each child cgroup
388 * A separate process is then created for each child cgroup which spawns a
392 * Once all of the children have exited, we verify that each child cgroup
432 if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
437 if (cg_write(child, "cgroup.subtree_control", "+cpu"))
453 leaf[i].cgroup = cg_name_indexed(ancestor, "cpucg_leaf", i);
454 if (!leaf[i].cgroup)
457 if (cg_create(leaf[i].cgroup))
460 if (cg_write_numeric(leaf[i].cgroup, "cpu.weight", weight))
475 pid = cg_run_nowait(leaf[i].cgroup, hog_cpus_timed,
493 leaf[i].usage = cg_read_key_long(leaf[i].cgroup,
516 cg_destroy(leaf[i].cgroup);
517 free(leaf[i].cgroup);
568 * This test creates a cgroup with some maximum value within a period, and
569 * verifies that a process in the cgroup is not overscheduled.
621 * This test verifies that a process inside of a nested cgroup whose parent
640 if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
704 ksft_exit_skip("cgroup v2 isn't mounted\n");
706 if (cg_read_strstr(root, "cgroup.subtree_control", "cpu"))
707 if (cg_write(root, "cgroup.subtree_control", "+cpu"))