diff mbox series

[RFC,2/3] memcg: export obj_cgroup* symbol to charge compressed RAM

Message ID 20230615034849.1361940-1-hezhongkun.hzk@bytedance.com (mailing list archive)
State New
Headers show
Series [RFC,1/3] zram: charge the compressed RAM to the page's memcgroup | expand

Commit Message

Zhongkun He June 15, 2023, 3:48 a.m. UTC
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(+)
diff mbox series

Patch

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 4b27e245a055..8ba93afacf31 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -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 */