Lines Matching refs:objcg
282 struct obj_cgroup *objcg; in memcg_slab_pre_alloc_hook() local
290 objcg = get_obj_cgroup_from_current(); in memcg_slab_pre_alloc_hook()
291 if (!objcg) in memcg_slab_pre_alloc_hook()
294 if (obj_cgroup_charge(objcg, flags, objects * obj_full_size(s))) { in memcg_slab_pre_alloc_hook()
295 obj_cgroup_put(objcg); in memcg_slab_pre_alloc_hook()
299 *objcgp = objcg; in memcg_slab_pre_alloc_hook()
303 static inline void mod_objcg_state(struct obj_cgroup *objcg, in mod_objcg_state() argument
311 memcg = obj_cgroup_memcg(objcg); in mod_objcg_state()
318 struct obj_cgroup *objcg, in memcg_slab_post_alloc_hook() argument
326 if (!memcg_kmem_enabled() || !objcg) in memcg_slab_post_alloc_hook()
335 obj_cgroup_uncharge(objcg, obj_full_size(s)); in memcg_slab_post_alloc_hook()
340 obj_cgroup_get(objcg); in memcg_slab_post_alloc_hook()
341 page_obj_cgroups(page)[off] = objcg; in memcg_slab_post_alloc_hook()
342 mod_objcg_state(objcg, page_pgdat(page), in memcg_slab_post_alloc_hook()
345 obj_cgroup_uncharge(objcg, obj_full_size(s)); in memcg_slab_post_alloc_hook()
348 obj_cgroup_put(objcg); in memcg_slab_post_alloc_hook()
355 struct obj_cgroup *objcg; in memcg_slab_free_hook() local
377 objcg = page_obj_cgroups(page)[off]; in memcg_slab_free_hook()
378 if (!objcg) in memcg_slab_free_hook()
382 obj_cgroup_uncharge(objcg, obj_full_size(s)); in memcg_slab_free_hook()
383 mod_objcg_state(objcg, page_pgdat(page), cache_vmstat_idx(s), in memcg_slab_free_hook()
385 obj_cgroup_put(objcg); in memcg_slab_free_hook()
418 struct obj_cgroup *objcg, in memcg_slab_post_alloc_hook() argument
525 struct obj_cgroup *objcg, in slab_post_alloc_hook() argument
538 memcg_slab_post_alloc_hook(s, objcg, flags, size, p); in slab_post_alloc_hook()