Lines Matching defs:cgroup
9 static int idle_process_fn(const char *cgroup, void *arg)
15 static int do_migration_fn(const char *cgroup, void *arg)
22 // XXX checking /proc/$pid/cgroup would be quicker than wait
23 if (cg_enter(cgroup, object_pid) ||
24 cg_wait_for_proc_count(cgroup, 1))
30 static int do_controller_fn(const char *cgroup, void *arg)
32 const char *child = cgroup;
38 if (!cg_read_strstr(child, "cgroup.controllers", "cpuset"))
41 if (cg_write(parent, "cgroup.subtree_control", "+cpuset"))
44 if (cg_read_strstr(child, "cgroup.controllers", "cpuset"))
47 if (cg_write(parent, "cgroup.subtree_control", "-cpuset"))
50 if (!cg_read_strstr(child, "cgroup.controllers", "cpuset"))
58 * The success should only depend on the parent cgroup permissions and not the
60 * security_task_setscheduler() in cgroup v1).
76 parent_procs = cg_name(parent, "cgroup.procs");
85 child_src_procs = cg_name(child_src, "cgroup.procs");
94 child_dst_procs = cg_name(child_dst, "cgroup.procs");
100 if (cg_write(parent, "cgroup.subtree_control", "+cpuset"))
103 if (cg_read_strstr(child_src, "cgroup.controllers", "cpuset") ||
104 cg_read_strstr(child_dst, "cgroup.controllers", "cpuset"))
123 * Child process's cgroup is irrelevant but we place it into child_dst
178 parent_procs = cg_name(parent, "cgroup.procs");
181 parent_subctl = cg_name(parent, "cgroup.subtree_control");
190 child_procs = cg_name(child, "cgroup.procs");
253 ksft_exit_skip("cgroup v2 isn't mounted\n");
255 if (cg_read_strstr(root, "cgroup.subtree_control", "cpuset"))
256 if (cg_write(root, "cgroup.subtree_control", "+cpuset"))