Lines Matching refs:parent

129 static int cg_run_in_subcgroups(const char *parent,  in cg_run_in_subcgroups()  argument
137 child = cg_name_indexed(parent, "child", i); in cg_run_in_subcgroups()
171 char *parent; in test_kmem_memcg_deletion() local
173 parent = cg_name(root, "kmem_memcg_deletion_test"); in test_kmem_memcg_deletion()
174 if (!parent) in test_kmem_memcg_deletion()
177 if (cg_create(parent)) in test_kmem_memcg_deletion()
180 if (cg_write(parent, "cgroup.subtree_control", "+memory")) in test_kmem_memcg_deletion()
183 if (cg_run_in_subcgroups(parent, alloc_kmem_smp, NULL, 100)) in test_kmem_memcg_deletion()
186 current = cg_read_long(parent, "memory.current"); in test_kmem_memcg_deletion()
187 anon = cg_read_key_long(parent, "memory.stat", "anon "); in test_kmem_memcg_deletion()
188 file = cg_read_key_long(parent, "memory.stat", "file "); in test_kmem_memcg_deletion()
189 kernel = cg_read_key_long(parent, "memory.stat", "kernel "); in test_kmem_memcg_deletion()
190 sock = cg_read_key_long(parent, "memory.stat", "sock "); in test_kmem_memcg_deletion()
207 cg_destroy(parent); in test_kmem_memcg_deletion()
208 free(parent); in test_kmem_memcg_deletion()
308 char *parent; in test_kmem_dead_cgroups() local
312 parent = cg_name(root, "kmem_dead_cgroups_test"); in test_kmem_dead_cgroups()
313 if (!parent) in test_kmem_dead_cgroups()
316 if (cg_create(parent)) in test_kmem_dead_cgroups()
319 if (cg_write(parent, "cgroup.subtree_control", "+memory")) in test_kmem_dead_cgroups()
322 if (cg_run_in_subcgroups(parent, alloc_dcache, (void *)100, 30)) in test_kmem_dead_cgroups()
326 dead = cg_read_key_long(parent, "cgroup.stat", in test_kmem_dead_cgroups()
340 cg_destroy(parent); in test_kmem_dead_cgroups()
341 free(parent); in test_kmem_dead_cgroups()
355 char *parent, *child; in test_percpu_basic() local
359 parent = cg_name(root, "percpu_basic_test"); in test_percpu_basic()
360 if (!parent) in test_percpu_basic()
363 if (cg_create(parent)) in test_percpu_basic()
366 if (cg_write(parent, "cgroup.subtree_control", "+memory")) in test_percpu_basic()
370 child = cg_name_indexed(parent, "child", i); in test_percpu_basic()
380 current = cg_read_long(parent, "memory.current"); in test_percpu_basic()
381 percpu = cg_read_key_long(parent, "memory.stat", "percpu "); in test_percpu_basic()
392 child = cg_name_indexed(parent, "child", i); in test_percpu_basic()
398 cg_destroy(parent); in test_percpu_basic()
399 free(parent); in test_percpu_basic()