Lines Matching defs:cgroup

24 	char *cgroup;
52 if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
62 if (cg_read_strstr(child, "cgroup.controllers", "cpu"))
80 if (!cg_read_strstr(child2, "cgroup.controllers", "cpu"))
132 static int hog_cpus_timed(const char *cgroup, void *arg)
181 * Creates a cpu cgroup, burns a CPU for a few quanta, and verifies that
235 * usertime in the cgroup is close to the expected time.
279 if (cg_write(cpucg, "cgroup.procs", buf))
323 if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
327 children[i].cgroup = cg_name_indexed(parent, "cpucg_child", i);
328 if (!children[i].cgroup)
331 if (cg_create(children[i].cgroup))
334 if (cg_write_numeric(children[i].cgroup, "cpu.weight",
357 children[i].usage = cg_read_key_long(children[i].cgroup,
366 cg_destroy(children[i].cgroup);
367 free(children[i].cgroup);
386 return cg_run_nowait(child->cgroup, hog_cpus_timed, (void *)&param);
422 * A separate process is then created for each child cgroup which spawns as
426 * Once all of the children have exited, we verify that each child cgroup
462 * A separate process is then created for each child cgroup which spawns a
466 * Once all of the children have exited, we verify that each child cgroup
506 if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
511 if (cg_write(child, "cgroup.subtree_control", "+cpu"))
527 leaf[i].cgroup = cg_name_indexed(ancestor, "cpucg_leaf", i);
528 if (!leaf[i].cgroup)
531 if (cg_create(leaf[i].cgroup))
534 if (cg_write_numeric(leaf[i].cgroup, "cpu.weight", weight))
549 pid = cg_run_nowait(leaf[i].cgroup, hog_cpus_timed,
567 leaf[i].usage = cg_read_key_long(leaf[i].cgroup,
590 cg_destroy(leaf[i].cgroup);
591 free(leaf[i].cgroup);
642 * This test creates a cgroup with some maximum value within a period, and
643 * verifies that a process in the cgroup is not overscheduled.
695 * This test verifies that a process inside of a nested cgroup whose parent
714 if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
779 ksft_exit_skip("cgroup v2 isn't mounted\n");
781 if (cg_read_strstr(root, "cgroup.subtree_control", "cpu"))
782 if (cg_write(root, "cgroup.subtree_control", "+cpu"))