/linux-6.6.21/mm/ |
D | slab.h | 453 void mod_objcg_state(struct obj_cgroup *objcg, struct pglist_data *pgdat, 479 struct obj_cgroup *objcg; in memcg_slab_pre_alloc_hook() local 487 objcg = get_obj_cgroup_from_current(); in memcg_slab_pre_alloc_hook() 488 if (!objcg) in memcg_slab_pre_alloc_hook() 495 memcg = get_mem_cgroup_from_objcg(objcg); in memcg_slab_pre_alloc_hook() 503 if (obj_cgroup_charge(objcg, flags, objects * obj_full_size(s))) in memcg_slab_pre_alloc_hook() 506 *objcgp = objcg; in memcg_slab_pre_alloc_hook() 509 obj_cgroup_put(objcg); in memcg_slab_pre_alloc_hook() 514 struct obj_cgroup *objcg, in memcg_slab_post_alloc_hook() argument 522 if (!memcg_kmem_online() || !objcg) in memcg_slab_post_alloc_hook() [all …]
|
D | memcontrol.c | 260 static void obj_cgroup_uncharge_pages(struct obj_cgroup *objcg, 265 struct obj_cgroup *objcg = container_of(ref, struct obj_cgroup, refcnt); in obj_cgroup_release() local 290 nr_bytes = atomic_read(&objcg->nr_charged_bytes); in obj_cgroup_release() 295 obj_cgroup_uncharge_pages(objcg, nr_pages); in obj_cgroup_release() 298 list_del(&objcg->list); in obj_cgroup_release() 302 kfree_rcu(objcg, rcu); in obj_cgroup_release() 307 struct obj_cgroup *objcg; in obj_cgroup_alloc() local 310 objcg = kzalloc(sizeof(struct obj_cgroup), GFP_KERNEL); in obj_cgroup_alloc() 311 if (!objcg) in obj_cgroup_alloc() 314 ret = percpu_ref_init(&objcg->refcnt, obj_cgroup_release, 0, in obj_cgroup_alloc() [all …]
|
D | zswap.c | 211 struct obj_cgroup *objcg; member 389 if (entry->objcg) { in zswap_free_entry() 390 obj_cgroup_uncharge_zswap(entry->objcg, entry->length); in zswap_free_entry() 391 obj_cgroup_put(entry->objcg); in zswap_free_entry() 1203 struct obj_cgroup *objcg = NULL; in zswap_store() local 1244 objcg = get_obj_cgroup_from_folio(folio); in zswap_store() 1245 if (objcg && !obj_cgroup_may_zswap(objcg)) in zswap_store() 1345 entry->objcg = objcg; in zswap_store() 1346 if (objcg) { in zswap_store() 1347 obj_cgroup_charge_zswap(objcg, entry->length); in zswap_store() [all …]
|
D | percpu.c | 1626 struct obj_cgroup *objcg; in pcpu_memcg_pre_alloc_hook() local 1631 objcg = get_obj_cgroup_from_current(); in pcpu_memcg_pre_alloc_hook() 1632 if (!objcg) in pcpu_memcg_pre_alloc_hook() 1635 if (obj_cgroup_charge(objcg, gfp, pcpu_obj_full_size(size))) { in pcpu_memcg_pre_alloc_hook() 1636 obj_cgroup_put(objcg); in pcpu_memcg_pre_alloc_hook() 1640 *objcgp = objcg; in pcpu_memcg_pre_alloc_hook() 1644 static void pcpu_memcg_post_alloc_hook(struct obj_cgroup *objcg, in pcpu_memcg_post_alloc_hook() argument 1648 if (!objcg) in pcpu_memcg_post_alloc_hook() 1652 chunk->obj_cgroups[off >> PCPU_MIN_ALLOC_SHIFT] = objcg; in pcpu_memcg_post_alloc_hook() 1655 mod_memcg_state(obj_cgroup_memcg(objcg), MEMCG_PERCPU_B, in pcpu_memcg_post_alloc_hook() [all …]
|
D | slab.c | 3217 struct obj_cgroup *objcg = NULL; in slab_alloc_node() local 3221 cachep = slab_pre_alloc_hook(cachep, lru, &objcg, 1, flags); in slab_alloc_node() 3237 slab_post_alloc_hook(cachep, objcg, flags, 1, &objp, init, in slab_alloc_node() 3456 struct obj_cgroup *objcg = NULL; in kmem_cache_alloc_bulk() local 3460 s = slab_pre_alloc_hook(s, NULL, &objcg, size, flags); in kmem_cache_alloc_bulk() 3481 slab_post_alloc_hook(s, objcg, flags, size, p, in kmem_cache_alloc_bulk() 3488 slab_post_alloc_hook(s, objcg, flags, i, p, false, s->object_size); in kmem_cache_alloc_bulk()
|
D | slub.c | 3457 struct obj_cgroup *objcg = NULL; in slab_alloc_node() local 3460 s = slab_pre_alloc_hook(s, lru, &objcg, 1, gfpflags); in slab_alloc_node() 3478 slab_post_alloc_hook(s, objcg, gfpflags, 1, &object, init, orig_size); in slab_alloc_node() 3935 size_t size, void **p, struct obj_cgroup *objcg) in __kmem_cache_alloc_bulk() argument 3998 slab_post_alloc_hook(s, objcg, flags, i, p, false, s->object_size); in __kmem_cache_alloc_bulk() 4005 size_t size, void **p, struct obj_cgroup *objcg) in __kmem_cache_alloc_bulk() argument 4028 slab_post_alloc_hook(s, objcg, flags, i, p, false, s->object_size); in __kmem_cache_alloc_bulk() 4039 struct obj_cgroup *objcg = NULL; in kmem_cache_alloc_bulk() local 4045 s = slab_pre_alloc_hook(s, NULL, &objcg, size, flags); in kmem_cache_alloc_bulk() 4049 i = __kmem_cache_alloc_bulk(s, flags, size, p, objcg); in kmem_cache_alloc_bulk() [all …]
|
/linux-6.6.21/include/linux/ |
D | memcontrol.h | 302 struct obj_cgroup __rcu *objcg; member 368 static inline struct mem_cgroup *obj_cgroup_memcg(struct obj_cgroup *objcg) in obj_cgroup_memcg() argument 370 return READ_ONCE(objcg->memcg); in obj_cgroup_memcg() 467 struct obj_cgroup *objcg; in folio_memcg_rcu() local 469 objcg = (void *)(memcg_data & ~MEMCG_DATA_FLAGS_MASK); in folio_memcg_rcu() 470 return obj_cgroup_memcg(objcg); in folio_memcg_rcu() 510 struct obj_cgroup *objcg; in folio_memcg_check() local 512 objcg = (void *)(memcg_data & ~MEMCG_DATA_FLAGS_MASK); in folio_memcg_check() 513 return obj_cgroup_memcg(objcg); in folio_memcg_check() 526 static inline struct mem_cgroup *get_mem_cgroup_from_objcg(struct obj_cgroup *objcg) in get_mem_cgroup_from_objcg() argument [all …]
|
D | bpf.h | 270 struct obj_cgroup *objcg; member
|
/linux-6.6.21/kernel/bpf/ |
D | memalloc.c | 95 struct obj_cgroup *objcg; member 157 if (c->objcg) in get_memcg() 158 return get_mem_cgroup_from_objcg(c->objcg); in get_memcg() 501 struct obj_cgroup *objcg = NULL; in bpf_mem_alloc_init() local 520 objcg = get_obj_cgroup_from_current(); in bpf_mem_alloc_init() 525 c->objcg = objcg; in bpf_mem_alloc_init() 543 objcg = get_obj_cgroup_from_current(); in bpf_mem_alloc_init() 550 c->objcg = objcg; in bpf_mem_alloc_init() 694 if (c->objcg) in bpf_mem_alloc_destroy() 695 obj_cgroup_put(c->objcg); in bpf_mem_alloc_destroy() [all …]
|
D | syscall.c | 397 map->objcg = get_obj_cgroup_from_current(); in bpf_map_save_memcg() 402 if (map->objcg) in bpf_map_release_memcg() 403 obj_cgroup_put(map->objcg); in bpf_map_release_memcg() 408 if (map->objcg) in bpf_map_get_memcg() 409 return get_mem_cgroup_from_objcg(map->objcg); in bpf_map_get_memcg()
|
/linux-6.6.21/mm/kfence/ |
D | kfence.h | 101 struct obj_cgroup *objcg; member
|
D | core.c | 603 slab->memcg_data = (unsigned long)&kfence_metadata_init[i / 2 - 1].objcg | in kfence_init_pool() 1147 KFENCE_WARN_ON(meta->objcg); in __kfence_free()
|
/linux-6.6.21/tools/cgroup/ |
D | memcg_slabinfo.py | 187 obj_cgroups.add(memcg.objcg.value_())
|