[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230615034849.1361940-1-hezhongkun.hzk@bytedance.com>
Date: Thu, 15 Jun 2023 11:48:49 +0800
From: Zhongkun He <hezhongkun.hzk@...edance.com>
To: minchan@...nel.org, senozhatsky@...omium.org, mhocko@...e.com
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Zhongkun He <hezhongkun.hzk@...edance.com>
Subject: [RFC PATCH 2/3] memcg: export obj_cgroup* symbol to charge compressed RAM
Export obj_cgroup* symbol to charge compressed memory in
zsmalloc module.
Signed-off-by: Zhongkun He <hezhongkun.hzk@...edance.com>
---
mm/memcontrol.c | 3 +++
1 file changed, 3 insertions(+)
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 */
--
2.25.1
Powered by blists - more mailing lists