Home
last modified time | relevance | path

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

/linux/mm/
H A Dmemcontrol.c151 struct obj_cgroup *objcg = container_of(ref, struct obj_cgroup, refcnt); in obj_cgroup_release() local
176 nr_bytes = atomic_read(&objcg->nr_charged_bytes); in obj_cgroup_release()
183 memcg = get_mem_cgroup_from_objcg(objcg); in obj_cgroup_release()
189 list_del(&objcg->list); in obj_cgroup_release()
193 kfree_rcu(objcg, rcu); in obj_cgroup_release()
198 struct obj_cgroup *objcg; in obj_cgroup_alloc() local
201 objcg = kzalloc_obj(struct obj_cgroup); in obj_cgroup_alloc()
202 if (!objcg) in obj_cgroup_alloc()
205 ret = percpu_ref_init(&objcg->refcnt, obj_cgroup_release, 0, in obj_cgroup_alloc()
208 kfree(objcg); in obj_cgroup_alloc()
[all …]
H A Dzswap.c196 struct obj_cgroup *objcg; member
654 return entry->objcg ? obj_cgroup_memcg(entry->objcg) : NULL; in mem_cgroup_from_entry()
770 if (entry->objcg) { in zswap_entry_free()
771 obj_cgroup_uncharge_zswap(entry->objcg, entry->length); in zswap_entry_free()
772 obj_cgroup_put(entry->objcg); in zswap_entry_free()
1041 if (entry->objcg) in zswap_writeback_entry()
1042 count_objcg_events(entry->objcg, ZSWPWB, 1); in zswap_writeback_entry()
1409 struct obj_cgroup *objcg, in zswap_store_page() argument
1452 if (objcg) { in zswap_store_page()
1453 obj_cgroup_get(objcg); in zswap_store_page()
[all …]
H A Dpage_io.c160 struct obj_cgroup *objcg = get_obj_cgroup_from_folio(folio); in swap_zeromap_folio_set() local
177 if (objcg) { in swap_zeromap_folio_set()
178 count_objcg_events(objcg, SWPOUT_ZERO, nr_pages); in swap_zeromap_folio_set()
179 obj_cgroup_put(objcg); in swap_zeromap_folio_set()
422 struct obj_cgroup *objcg; in swap_read_folio_zeromap() local
440 objcg = get_obj_cgroup_from_folio(folio); in swap_read_folio_zeromap()
442 if (objcg) { in swap_read_folio_zeromap()
443 count_objcg_events(objcg, SWPIN_ZERO, nr_pages); in swap_read_folio_zeromap()
444 obj_cgroup_put(objcg); in swap_read_folio_zeromap()
H A Dmemcontrol-v1.c621 struct obj_cgroup *objcg; in __memcg1_swapout() local
635 objcg = folio_objcg(folio); in __memcg1_swapout()
636 VM_WARN_ON_ONCE_FOLIO(!objcg, folio); in __memcg1_swapout()
637 if (!objcg) in __memcg1_swapout()
641 memcg = obj_cgroup_memcg(objcg); in __memcg1_swapout()
657 if (!obj_cgroup_is_root(objcg)) in __memcg1_swapout()
678 obj_cgroup_put(objcg); in __memcg1_swapout()
H A Dslab.h808 struct obj_cgroup *objcg) in slab_obj_ext_set_objcg() argument
813 obj_ext->_objcg = objcg; in slab_obj_ext_set_objcg()
/linux/include/linux/
H A Dmemcontrol.h124 struct obj_cgroup __rcu *objcg; member
380 static inline struct mem_cgroup *obj_cgroup_memcg(struct obj_cgroup *objcg) in obj_cgroup_memcg() argument
383 return READ_ONCE(objcg->memcg); in obj_cgroup_memcg()
434 struct obj_cgroup *objcg = folio_objcg(folio); in folio_memcg() local
436 return objcg ? obj_cgroup_memcg(objcg) : NULL; in folio_memcg()
472 struct obj_cgroup *objcg; in folio_memcg_check() local
477 objcg = (void *)(memcg_data & ~OBJEXTS_FLAGS_MASK); in folio_memcg_check()
479 return objcg ? obj_cgroup_memcg(objcg) : NULL; in folio_memcg_check()
489 static inline struct mem_cgroup *get_mem_cgroup_from_objcg(struct obj_cgroup *objcg) in get_mem_cgroup_from_objcg() argument
495 memcg = obj_cgroup_memcg(objcg); in get_mem_cgroup_from_objcg()
[all …]
H A Dbpf_mem_alloc.h14 struct obj_cgroup *objcg; member
33 int bpf_mem_alloc_percpu_init(struct bpf_mem_alloc *ma, struct obj_cgroup *objcg);
H A Dsched.h1580 /* Cache for current->cgroups->memcg->nodeinfo[nid]->objcg lookups: */ member
1581 struct obj_cgroup *objcg;
H A Dbpf.h322 struct obj_cgroup *objcg; member
/linux/kernel/bpf/
H A Dmemalloc.c97 struct obj_cgroup *objcg; member
169 if (c->objcg) in get_memcg()
170 return get_mem_cgroup_from_objcg(c->objcg); in get_memcg()
543 struct obj_cgroup *objcg = NULL; in bpf_mem_alloc_init()
565 objcg = get_obj_cgroup_from_current(); in bpf_mem_alloc_init()
567 ma->objcg = objcg; in bpf_mem_alloc_init()
572 c->objcg = objcg; in bpf_mem_alloc_init()
587 objcg in bpf_mem_alloc_percpu_init()
511 struct obj_cgroup *objcg = NULL; bpf_mem_alloc_init() local
576 bpf_mem_alloc_percpu_init(struct bpf_mem_alloc * ma,struct obj_cgroup * objcg) bpf_mem_alloc_percpu_init() argument
594 struct obj_cgroup *objcg; bpf_mem_alloc_percpu_unit_init() local
[all...]
H A Dsyscall.c490 * So we have to check map->objcg for being NULL each time it's in bpf_map_save_memcg()
494 map->objcg = get_obj_cgroup_from_current(); in bpf_map_save_memcg()
499 if (map->objcg) in bpf_map_release_memcg()
500 obj_cgroup_put(map->objcg); in bpf_map_release_memcg()
505 if (map->objcg) in bpf_map_get_memcg()
506 return get_mem_cgroup_from_objcg(map->objcg); in bpf_map_get_memcg()
/linux/tools/cgroup/
H A Dmemcg_slabinfo.py186 obj_cgroups.add(memcg.objcg.value_())