[RFC,2/3] memcg: export obj_cgroup* symbol to charge compressed RAM
Commit Message
Export obj_cgroup* symbol to charge compressed memory in
zsmalloc module.
Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
---
mm/memcontrol.c | 3 +++
1 file changed, 3 insertions(+)
@@ -3064,6 +3064,7 @@ __always_inline struct obj_cgroup *get_obj_cgroup_from_current(void)
rcu_read_unlock();
return objcg;
}
+EXPORT_SYMBOL(get_obj_cgroup_from_current);
struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
{
@@ -3431,11 +3432,13 @@ int obj_cgroup_charge(struct obj_cgroup *objcg, gfp_t gfp, size_t size)
return ret;
}
+EXPORT_SYMBOL(obj_cgroup_charge);
void obj_cgroup_uncharge(struct obj_cgroup *objcg, size_t size)
{
refill_obj_stock(objcg, size, true);
}
+EXPORT_SYMBOL(obj_cgroup_uncharge);
#endif /* CONFIG_MEMCG_KMEM */