Lines Matching refs:parent
125 static int cg_run_in_subcgroups(const char *parent, in cg_run_in_subcgroups() argument
133 child = cg_name_indexed(parent, "child", i); in cg_run_in_subcgroups()
167 char *parent; in test_kmem_memcg_deletion() local
169 parent = cg_name(root, "kmem_memcg_deletion_test"); in test_kmem_memcg_deletion()
170 if (!parent) in test_kmem_memcg_deletion()
173 if (cg_create(parent)) in test_kmem_memcg_deletion()
176 if (cg_write(parent, "cgroup.subtree_control", "+memory")) in test_kmem_memcg_deletion()
179 if (cg_run_in_subcgroups(parent, alloc_kmem_smp, NULL, 100)) in test_kmem_memcg_deletion()
182 current = cg_read_long(parent, "memory.current"); in test_kmem_memcg_deletion()
183 slab = cg_read_key_long(parent, "memory.stat", "slab "); in test_kmem_memcg_deletion()
184 anon = cg_read_key_long(parent, "memory.stat", "anon "); in test_kmem_memcg_deletion()
185 file = cg_read_key_long(parent, "memory.stat", "file "); in test_kmem_memcg_deletion()
186 kernel_stack = cg_read_key_long(parent, "memory.stat", "kernel_stack "); in test_kmem_memcg_deletion()
204 cg_destroy(parent); in test_kmem_memcg_deletion()
205 free(parent); in test_kmem_memcg_deletion()
305 char *parent; in test_kmem_dead_cgroups() local
309 parent = cg_name(root, "kmem_dead_cgroups_test"); in test_kmem_dead_cgroups()
310 if (!parent) in test_kmem_dead_cgroups()
313 if (cg_create(parent)) in test_kmem_dead_cgroups()
316 if (cg_write(parent, "cgroup.subtree_control", "+memory")) in test_kmem_dead_cgroups()
319 if (cg_run_in_subcgroups(parent, alloc_dcache, (void *)100, 30)) in test_kmem_dead_cgroups()
323 dead = cg_read_key_long(parent, "cgroup.stat", in test_kmem_dead_cgroups()
337 cg_destroy(parent); in test_kmem_dead_cgroups()
338 free(parent); in test_kmem_dead_cgroups()
352 char *parent, *child; in test_percpu_basic() local
356 parent = cg_name(root, "percpu_basic_test"); in test_percpu_basic()
357 if (!parent) in test_percpu_basic()
360 if (cg_create(parent)) in test_percpu_basic()
363 if (cg_write(parent, "cgroup.subtree_control", "+memory")) in test_percpu_basic()
367 child = cg_name_indexed(parent, "child", i); in test_percpu_basic()
377 current = cg_read_long(parent, "memory.current"); in test_percpu_basic()
378 percpu = cg_read_key_long(parent, "memory.stat", "percpu "); in test_percpu_basic()
389 child = cg_name_indexed(parent, "child", i); in test_percpu_basic()
395 cg_destroy(parent); in test_percpu_basic()
396 free(parent); in test_percpu_basic()