ANDROID: Export symbols to do reverse mapping within memcg in kernel modules.

Export the symbols below to do reverse mapping within memcg:
  root_mem_cgroup
  page_referenced

Bug: 296526618
Change-Id: Ia9c5876bd97d3f13c92b28af2ca5e74b3f91bd5a
Signed-off-by: Zichun Zheng <zhengzichun@oppo.com>
This commit is contained in:
Zichun Zheng 2023-08-22 12:06:22 +08:00
parent 8af1bc5622
commit 98a66e87c1
2 changed files with 2 additions and 0 deletions

View File

@ -73,6 +73,7 @@ struct cgroup_subsys memory_cgrp_subsys __read_mostly;
EXPORT_SYMBOL(memory_cgrp_subsys);
struct mem_cgroup *root_mem_cgroup __read_mostly;
EXPORT_SYMBOL_GPL(root_mem_cgroup);
/* Active memory cgroup to use from an interrupt context */
DEFINE_PER_CPU(struct mem_cgroup *, int_active_memcg);

View File

@ -915,6 +915,7 @@ int page_referenced(struct page *page,
return rwc.contended ? -1 : pra.referenced;
}
EXPORT_SYMBOL_GPL(page_referenced);
static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
unsigned long address, void *arg)