Lines Matching defs:child
42 char *parent = NULL, *child = NULL, *parent2 = NULL, *child2 = NULL;
56 child = cg_name(parent, "cpucg_test_child");
57 if (!child)
60 if (cg_create(child))
63 if (cg_read_strstr(child, "cgroup.controllers", "cpu"))
87 cg_destroy(child);
88 free(child);
310 pid_t (*spawn_child)(const struct cpu_hogger *child),
376 static pid_t weight_hog_ncpus(const struct cpu_hogger *child, int ncpus)
387 return cg_run_nowait(child->cgroup, hog_cpus_timed, (void *)¶m);
390 static pid_t weight_hog_all_cpus(const struct cpu_hogger *child)
392 return weight_hog_ncpus(child, get_nprocs());
423 * A separate process is then created for each child cgroup which spawns as
427 * Once all of the children have exited, we verify that each child cgroup
436 static pid_t weight_hog_one_cpu(const struct cpu_hogger *child)
438 return weight_hog_ncpus(child, 1);
463 * A separate process is then created for each child cgroup which spawns a
465 * have at least one core per-thread in the child processes.
467 * Once all of the children have exited, we verify that each child cgroup
485 char *parent = NULL, *child = NULL;
501 child = cg_name(parent, "cpucg_child");
502 if (!parent || !child)
510 if (cg_create(child))
512 if (cg_write(child, "cgroup.subtree_control", "+cpu"))
514 if (cg_write(child, "cpu.weight", "1000"))
525 ancestor = child;
582 child_usage = cg_read_key_long(child, "cpu.stat", "usage_usec");
594 cg_destroy(child);
595 free(child);
719 char *parent, *child;
725 child = cg_name(parent, "cpucg_child");
726 if (!parent || !child)
735 if (cg_create(child))
749 if (cg_run(child, hog_cpus_timed, (void *)¶m))
752 usage_usec = cg_read_key_long(child, "cpu.stat", "usage_usec");
771 cg_destroy(child);
772 free(child);