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()
187 pagetables = cg_read_key_long(parent, "memory.stat", "pagetables "); in test_kmem_memcg_deletion()
188 percpu = cg_read_key_long(parent, "memory.stat", "percpu "); in test_kmem_memcg_deletion()
189 sock = cg_read_key_long(parent, "memory.stat", "sock "); in test_kmem_memcg_deletion()
210 cg_destroy(parent); in test_kmem_memcg_deletion()
211 free(parent); in test_kmem_memcg_deletion()
311 char *parent; in test_kmem_dead_cgroups() local
315 parent = cg_name(root, "kmem_dead_cgroups_test"); in test_kmem_dead_cgroups()
316 if (!parent) in test_kmem_dead_cgroups()
319 if (cg_create(parent)) in test_kmem_dead_cgroups()
322 if (cg_write(parent, "cgroup.subtree_control", "+memory")) in test_kmem_dead_cgroups()
325 if (cg_run_in_subcgroups(parent, alloc_dcache, (void *)100, 30)) in test_kmem_dead_cgroups()
329 dead = cg_read_key_long(parent, "cgroup.stat", in test_kmem_dead_cgroups()
343 cg_destroy(parent); in test_kmem_dead_cgroups()
344 free(parent); in test_kmem_dead_cgroups()
358 char *parent, *child; in test_percpu_basic() local
362 parent = cg_name(root, "percpu_basic_test"); in test_percpu_basic()
363 if (!parent) in test_percpu_basic()
366 if (cg_create(parent)) in test_percpu_basic()
369 if (cg_write(parent, "cgroup.subtree_control", "+memory")) in test_percpu_basic()
373 child = cg_name_indexed(parent, "child", i); in test_percpu_basic()
383 current = cg_read_long(parent, "memory.current"); in test_percpu_basic()
384 percpu = cg_read_key_long(parent, "memory.stat", "percpu "); in test_percpu_basic()
395 child = cg_name_indexed(parent, "child", i); in test_percpu_basic()
401 cg_destroy(parent); in test_percpu_basic()
402 free(parent); in test_percpu_basic()