Home
last modified time | relevance | path

Searched refs:objcg (Results 1 – 7 of 7) sorted by relevance

/mm/
Dslab.h281 void mod_objcg_state(struct obj_cgroup *objcg, struct pglist_data *pgdat,
306 struct obj_cgroup *objcg; in memcg_slab_pre_alloc_hook() local
314 objcg = get_obj_cgroup_from_current(); in memcg_slab_pre_alloc_hook()
315 if (!objcg) in memcg_slab_pre_alloc_hook()
318 if (obj_cgroup_charge(objcg, flags, objects * obj_full_size(s))) { in memcg_slab_pre_alloc_hook()
319 obj_cgroup_put(objcg); in memcg_slab_pre_alloc_hook()
323 *objcgp = objcg; in memcg_slab_pre_alloc_hook()
328 struct obj_cgroup *objcg, in memcg_slab_post_alloc_hook() argument
336 if (!memcg_kmem_enabled() || !objcg) in memcg_slab_post_alloc_hook()
346 obj_cgroup_uncharge(objcg, obj_full_size(s)); in memcg_slab_post_alloc_hook()
[all …]
Dmemcontrol.c267 static void obj_cgroup_uncharge_pages(struct obj_cgroup *objcg,
272 struct obj_cgroup *objcg = container_of(ref, struct obj_cgroup, refcnt); in obj_cgroup_release() local
297 nr_bytes = atomic_read(&objcg->nr_charged_bytes); in obj_cgroup_release()
302 obj_cgroup_uncharge_pages(objcg, nr_pages); in obj_cgroup_release()
305 list_del(&objcg->list); in obj_cgroup_release()
309 kfree_rcu(objcg, rcu); in obj_cgroup_release()
314 struct obj_cgroup *objcg; in obj_cgroup_alloc() local
317 objcg = kzalloc(sizeof(struct obj_cgroup), GFP_KERNEL); in obj_cgroup_alloc()
318 if (!objcg) in obj_cgroup_alloc()
321 ret = percpu_ref_init(&objcg->refcnt, obj_cgroup_release, 0, in obj_cgroup_alloc()
[all …]
Dpercpu.c1629 struct obj_cgroup *objcg; in pcpu_memcg_pre_alloc_hook() local
1634 objcg = get_obj_cgroup_from_current(); in pcpu_memcg_pre_alloc_hook()
1635 if (!objcg) in pcpu_memcg_pre_alloc_hook()
1638 if (obj_cgroup_charge(objcg, gfp, size * num_possible_cpus())) { in pcpu_memcg_pre_alloc_hook()
1639 obj_cgroup_put(objcg); in pcpu_memcg_pre_alloc_hook()
1643 *objcgp = objcg; in pcpu_memcg_pre_alloc_hook()
1647 static void pcpu_memcg_post_alloc_hook(struct obj_cgroup *objcg, in pcpu_memcg_post_alloc_hook() argument
1651 if (!objcg) in pcpu_memcg_post_alloc_hook()
1655 chunk->obj_cgroups[off >> PCPU_MIN_ALLOC_SHIFT] = objcg; in pcpu_memcg_post_alloc_hook()
1658 mod_memcg_state(obj_cgroup_memcg(objcg), MEMCG_PERCPU_B, in pcpu_memcg_post_alloc_hook()
[all …]
Dslab.c3218 struct obj_cgroup *objcg = NULL; in slab_alloc_node() local
3222 cachep = slab_pre_alloc_hook(cachep, &objcg, 1, flags); in slab_alloc_node()
3261 slab_post_alloc_hook(cachep, objcg, flags, 1, &ptr, init); in slab_alloc_node()
3302 struct obj_cgroup *objcg = NULL; in slab_alloc() local
3306 cachep = slab_pre_alloc_hook(cachep, &objcg, 1, flags); in slab_alloc()
3323 slab_post_alloc_hook(cachep, objcg, flags, 1, &objp, init); in slab_alloc()
3531 struct obj_cgroup *objcg = NULL; in kmem_cache_alloc_bulk() local
3533 s = slab_pre_alloc_hook(s, &objcg, size, flags); in kmem_cache_alloc_bulk()
3555 slab_post_alloc_hook(s, objcg, flags, size, p, in kmem_cache_alloc_bulk()
3562 slab_post_alloc_hook(s, objcg, flags, i, p, false); in kmem_cache_alloc_bulk()
Dslub.c3147 struct obj_cgroup *objcg = NULL; in slab_alloc_node() local
3150 s = slab_pre_alloc_hook(s, &objcg, 1, gfpflags); in slab_alloc_node()
3236 slab_post_alloc_hook(s, objcg, gfpflags, 1, &object, init); in slab_alloc_node()
3667 struct obj_cgroup *objcg = NULL; in kmem_cache_alloc_bulk() local
3670 s = slab_pre_alloc_hook(s, &objcg, size, flags); in kmem_cache_alloc_bulk()
3730 slab_post_alloc_hook(s, objcg, flags, size, p, in kmem_cache_alloc_bulk()
3735 slab_post_alloc_hook(s, objcg, flags, i, p, false); in kmem_cache_alloc_bulk()
/mm/kfence/
Dkfence.h93 struct obj_cgroup *objcg; member
Dcore.c543 page->memcg_data = (unsigned long)&kfence_metadata[i / 2 - 1].objcg | in kfence_init_pool()
940 KFENCE_WARN_ON(meta->objcg); in __kfence_free()