cg_write
return cg_write(cgroup, control, buf);
if (!cg_write(cgroup, "cgroup.kill", "1"))
return cg_write(cgroup, "cgroup.procs", pidbuf);
return cg_write(cgroup, "cgroup.procs", "0");
return cg_write(cgroup, CG_THREADS_FILE, "0");
if (cg_write(cgroup, "cgroup.procs", buf))
if (cg_write(cgroup, "cgroup.procs", buf))
extern int cg_write(const char *cgroup, const char *control, char *buf);
if (cg_write(parent, "cgroup.type", "threaded"))
if (cg_write(child, "cgroup.type", "threaded"))
cg_write(root, "cgroup.subtree_control", "+cpu")) {
if (cg_write(parent, "cgroup.type", "threaded"))
if (cg_write(child, "cgroup.type", "threaded"))
if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
if (!cg_write(child, "cgroup.subtree_control", "+memory"))
if (cg_write(parent, "cgroup.subtree_control", "+memory"))
if (cg_write(child, "cgroup.subtree_control", "+memory"))
if (!cg_write(parent, "cgroup.subtree_control", "-memory"))
if (cg_write(parent, "cgroup.subtree_control", "+memory"))
if (cg_write(grps[1], "cgroup.type", "threaded"))
if (cg_write(grps[2], "cgroup.type", "threaded"))
if (cg_write(root, "cgroup.subtree_control", "+memory"))
if (cg_write(cpucg, "cgroup.procs", buf))
if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
if (cg_write(child, "cgroup.subtree_control", "+cpu"))
if (cg_write(child, "cpu.weight", "1000"))
if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
if (cg_write(cpucg, "cpu.max", quota_buf))
if (cg_write(parent, "cgroup.subtree_control", "+cpu"))
if (cg_write(parent, "cpu.max", quota_buf))
if (cg_write(root, "cgroup.subtree_control", "+cpu"))
if (cg_write(parent, "cgroup.subtree_control", "+cpuset"))
if (cg_write(root, "cgroup.subtree_control", "+cpuset"))
if (cg_write(parent, "cgroup.subtree_control", "+cpuset"))
if (cg_write(parent, "cgroup.subtree_control", "-cpuset"))
return cg_write(cgroup, "cgroup.freeze", freeze ? "1" : "0");
if (cg_write(test_group, "memory.max", "100M")) {
if (cg_write(test_group, "memory.swap.max", "0")) {
ret = cg_write(cgroup, "cgroup.kill", "1");
if (cg_write(parent, "cgroup.subtree_control", "+memory"))
if (cg_write(parent, "cgroup.subtree_control", "+memory"))
if (cg_write(parent, "cgroup.subtree_control", "+memory"))
if (cg_write(root, "cgroup.subtree_control", "+memory"))
cg_write(cg, "memory.high", "1M");
if (cg_write(memcg, "memory.swap.max", "30M"))
if (cg_write(memcg, "memory.max", "30M"))
peak_reset = cg_write(memcg, "memory.swap.peak", (char *)reset_string);
peak_reset = cg_write(memcg, "memory.peak", (char *)reset_string);
if (cg_write(memcg, "memory.max", "30M"))
if (cg_write(memcg, "memory.swap.max", "0"))
if (cg_write(parent, "cgroup.subtree_control", "+memory"))
if (cg_write(parent, "cgroup.subtree_control", "+memory"))
if (cg_write(child, "memory.max", "50M"))
if (cg_write(child, "memory.swap.max", "0"))
if (cg_write(child, "memory.oom.group", "1"))
if (cg_write(parent, "memory.max", "80M"))
if (cg_write(parent, "memory.swap.max", "0"))
if (cg_write(parent, "memory.oom.group", "1"))
if (cg_write(memcg, "memory.max", "50M"))
if (cg_write(memcg, "memory.swap.max", "0"))
if (cg_write(memcg, "memory.oom.group", "1"))
if (cg_write(root, "cgroup.subtree_control", "+memory"))
if (cg_write(parent[0], "cgroup.subtree_control", "+memory"))
if (cg_write(parent[0], "memory.max", "200M"))
if (cg_write(parent[0], "memory.swap.max", "0"))
if (cg_write(parent[1], "cgroup.subtree_control", "+memory"))
if (cg_write(parent[1], attribute, "50M"))
if (cg_write(children[0], attribute, "75M"))
if (cg_write(children[1], attribute, "25M"))
if (cg_write(children[2], attribute, "0"))
if (cg_write(children[3], attribute, "500M"))
if (cg_write(memcg, "memory.swap.max", "0"))
if (cg_write(memcg, "memory.high", "30M"))
if (cg_write(memcg, "memory.swap.max", "0"))
if (cg_write(memcg, "memory.high", "30M"))
if (cg_write(memcg, "memory.max", "140M"))
if (cg_write(memcg, "memory.swap.max", "0"))
if (cg_write(memcg, "memory.max", "30M"))
err = cg_write(memcg, "memory.reclaim", buf);
if (cg_write(root, "cgroup.subtree_control", "+pids"))
if (cg_write(cg_pids, "pids.max", "2"))
if (cg_write(cg_parent, "cgroup.subtree_control", "+pids"))
if (cg_write(cg_parent, "pids.max", "2"))
if (cg_write(group_name, "memory.max", "1M")) {
if (cg_write(test_group, "memory.max", "1M"))
if (cg_write(test_group, "memory.max", "8M"))
if (cg_write(test_group, "memory.zswap.max", "0"))
if (cg_write(test_group, "memory.max", "8M"))
if (cg_write(test_group, "memory.zswap.max", "max"))
if (cg_write(test_group, "memory.zswap.writeback", wb ? "1" : "0"))
if (cg_write(test_group, "memory.zswap.max", "max"))
if (cg_write(test_group, "cgroup.subtree_control", "+memory"))
if (cg_write(test_group_child, "memory.zswap.writeback", "1"))
if (cg_write(wb_group, "memory.zswap.max", "10K"))
if (cg_write(root, "cgroup.subtree_control", "+memory"))