Home
last modified time | relevance | path

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

/linux/mm/
H A Dmemcontrol.c139 struct obj_cgroup *objcg = container_of(ref, struct obj_cgroup, refcnt); in obj_cgroup_release() local
164 nr_bytes = atomic_read(&objcg->nr_charged_bytes); in obj_cgroup_release()
171 memcg = get_mem_cgroup_from_objcg(objcg); in obj_cgroup_release()
180 list_del(&objcg->list); in obj_cgroup_release()
184 kfree_rcu(objcg, rcu); in obj_cgroup_release()
189 struct obj_cgroup *objcg; in obj_cgroup_alloc() local
192 objcg = kzalloc(sizeof(struct obj_cgroup), GFP_KERNEL); in obj_cgroup_alloc()
193 if (!objcg) in obj_cgroup_alloc()
196 ret = percpu_ref_init(&objcg->refcnt, obj_cgroup_release, 0, in obj_cgroup_alloc()
199 kfree(objcg); in obj_cgroup_alloc()
[all …]
H A Dzswap.c196 struct obj_cgroup *objcg; member
608 return entry->objcg ? obj_cgroup_memcg(entry->objcg) : NULL; in mem_cgroup_from_entry()
722 if (entry->objcg) { in zswap_entry_free()
723 obj_cgroup_uncharge_zswap(entry->objcg, entry->length); in zswap_entry_free()
724 obj_cgroup_put(entry->objcg); in zswap_entry_free()
1059 if (entry->objcg) in zswap_writeback_entry()
1060 count_objcg_events(entry->objcg, ZSWPWB, 1); in zswap_writeback_entry()
1416 struct obj_cgroup *objcg, in zswap_store_page() argument
1459 if (objcg) { in zswap_store_page()
1460 obj_cgroup_get(objcg); in zswap_store_page()
[all …]
H A Dpage_io.c206 struct obj_cgroup *objcg = get_obj_cgroup_from_folio(folio); in swap_zeromap_folio_set() local
218 if (objcg) { in swap_zeromap_folio_set()
219 count_objcg_events(objcg, SWPOUT_ZERO, nr_pages); in swap_zeromap_folio_set()
220 obj_cgroup_put(objcg); in swap_zeromap_folio_set()
511 struct obj_cgroup *objcg; in swap_read_folio_zeromap() local
526 objcg = get_obj_cgroup_from_folio(folio); in swap_read_folio_zeromap()
528 if (objcg) { in swap_read_folio_zeromap()
529 count_objcg_events(objcg, SWPIN_ZERO, nr_pages); in swap_read_folio_zeromap()
530 obj_cgroup_put(objcg); in swap_read_folio_zeromap()
H A Dpercpu.c1613 struct obj_cgroup *objcg; in pcpu_memcg_pre_alloc_hook() local
1618 objcg = current_obj_cgroup(); in pcpu_memcg_pre_alloc_hook()
1619 if (!objcg) in pcpu_memcg_pre_alloc_hook()
1622 if (obj_cgroup_charge(objcg, gfp, pcpu_obj_full_size(size))) in pcpu_memcg_pre_alloc_hook()
1625 *objcgp = objcg; in pcpu_memcg_pre_alloc_hook()
1629 static void pcpu_memcg_post_alloc_hook(struct obj_cgroup *objcg, in pcpu_memcg_post_alloc_hook() argument
1633 if (!objcg) in pcpu_memcg_post_alloc_hook()
1637 obj_cgroup_get(objcg); in pcpu_memcg_post_alloc_hook()
1638 chunk->obj_exts[off >> PCPU_MIN_ALLOC_SHIFT].cgroup = objcg; in pcpu_memcg_post_alloc_hook()
1641 mod_memcg_state(obj_cgroup_memcg(objcg), MEMCG_PERCPU_B, in pcpu_memcg_post_alloc_hook()
[all …]
H A Dslub.c2417 if (unlikely(slab_exts[off].objcg)) in memcg_slab_post_charge()
/linux/include/linux/
H A Dmemcontrol.h264 struct obj_cgroup __rcu *objcg; member
379 static inline struct mem_cgroup *obj_cgroup_memcg(struct obj_cgroup *objcg) in obj_cgroup_memcg() argument
382 return READ_ONCE(objcg->memcg); in obj_cgroup_memcg()
496 struct obj_cgroup *objcg; in folio_memcg_check() local
498 objcg = (void *)(memcg_data & ~OBJEXTS_FLAGS_MASK); in folio_memcg_check()
499 return obj_cgroup_memcg(objcg); in folio_memcg_check()
512 static inline struct mem_cgroup *get_mem_cgroup_from_objcg(struct obj_cgroup *objcg) in get_mem_cgroup_from_objcg() argument
518 memcg = obj_cgroup_memcg(objcg); in get_mem_cgroup_from_objcg()
773 static inline bool obj_cgroup_tryget(struct obj_cgroup *objcg) in obj_cgroup_tryget() argument
775 return percpu_ref_tryget(&objcg->refcnt); in obj_cgroup_tryget()
[all …]
H A Dbpf_mem_alloc.h14 struct obj_cgroup *objcg; member
31 int bpf_mem_alloc_percpu_init(struct bpf_mem_alloc *ma, struct obj_cgroup *objcg);
H A Dsched.h1558 struct obj_cgroup *objcg; member
H A Dbpf.h316 struct obj_cgroup *objcg; member
/linux/kernel/bpf/
H A Dmemalloc.c97 struct obj_cgroup *objcg; member
161 if (c->objcg) in get_memcg()
162 return get_mem_cgroup_from_objcg(c->objcg); in get_memcg()
513 struct obj_cgroup *objcg = NULL; in bpf_mem_alloc_init() local
535 objcg = get_obj_cgroup_from_current(); in bpf_mem_alloc_init()
537 ma->objcg = objcg; in bpf_mem_alloc_init()
542 c->objcg = objcg; in bpf_mem_alloc_init()
556 objcg = get_obj_cgroup_from_current(); in bpf_mem_alloc_init()
558 ma->objcg = objcg; in bpf_mem_alloc_init()
564 c->objcg = objcg; in bpf_mem_alloc_init()
[all …]
H A Dsyscall.c491 map->objcg = get_obj_cgroup_from_current(); in bpf_map_save_memcg()
496 if (map->objcg) in bpf_map_release_memcg()
497 obj_cgroup_put(map->objcg); in bpf_map_release_memcg()
502 if (map->objcg) in bpf_map_get_memcg()
503 return get_mem_cgroup_from_objcg(map->objcg); in bpf_map_get_memcg()
/linux/tools/mm/
H A Dshow_page_info.py61 memcg = slabobj_ext.objcg.memcg.value_()
63 objcg = cast("struct obj_cgroup *", memcg_data & ~mask)
64 memcg = objcg.memcg.value_()
/linux/tools/cgroup/
H A Dmemcg_slabinfo.py186 obj_cgroups.add(memcg.objcg.value_())
/linux/mm/kfence/
H A Dcore.c1171 KFENCE_WARN_ON(meta->obj_exts.objcg); in __kfence_free()