Lines Matching defs:child

40 	char *parent = NULL, *child = NULL, *parent2 = NULL, *child2 = NULL;
54 child = cg_name(parent, "cpucg_test_child");
55 if (!child)
58 if (cg_create(child))
61 if (cg_read_strstr(child, "cgroup.controllers", "cpu"))
85 cg_destroy(child);
86 free(child);
235 pid_t (*spawn_child)(const struct cpu_hogger *child),
301 static pid_t weight_hog_ncpus(const struct cpu_hogger *child, int ncpus)
312 return cg_run_nowait(child->cgroup, hog_cpus_timed, (void *)&param);
315 static pid_t weight_hog_all_cpus(const struct cpu_hogger *child)
317 return weight_hog_ncpus(child, get_nprocs());
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
361 static pid_t weight_hog_one_cpu(const struct cpu_hogger *child)
363 return weight_hog_ncpus(child, 1);
388 * A separate process is then created for each child cgroup which spawns a
390 * have at least one core per-thread in the child processes.
392 * Once all of the children have exited, we verify that each child cgroup
410 char *parent = NULL, *child = NULL;
426 child = cg_name(parent, "cpucg_child");
427 if (!parent || !child)
435 if (cg_create(child))
437 if (cg_write(child, "cgroup.subtree_control", "+cpu"))
439 if (cg_write(child, "cpu.weight", "1000"))
450 ancestor = child;
507 child_usage = cg_read_key_long(child, "cpu.stat", "usage_usec");
519 cg_destroy(child);
520 free(child);
630 char *parent, *child;
633 child = cg_name(parent, "cpucg_child");
634 if (!parent || !child)
643 if (cg_create(child))
657 if (cg_run(child, hog_cpus_timed, (void *)&param))
660 usage_usec = cg_read_key_long(child, "cpu.stat", "usage_usec");
661 user_usec = cg_read_key_long(child, "cpu.stat", "user_usec");
674 cg_destroy(child);
675 free(child);