Commit b627b774 authored by Xin Hao's avatar Xin Hao Committed by Linus Torvalds

mm/damon: unified access_check function naming rules

Patch series "mm/damon: Do some small changes", v4.

This patch (of 4):

In damon/paddr.c file, two functions names start with underscore,
	static void __damon_pa_prepare_access_check(struct damon_ctx *ctx,
			struct damon_region *r)
	static void __damon_pa_prepare_access_check(struct damon_ctx *ctx,
			struct damon_region *r)
In damon/vaddr.c file, there are also two functions with the same function,
	static void damon_va_prepare_access_check(struct damon_ctx *ctx,
			struct mm_struct *mm, struct damon_region *r)
	static void damon_va_check_access(struct damon_ctx *ctx,
			struct mm_struct *mm, struct damon_region *r)

It makes sense to keep consistent, and it is not easy to be confused with
the function that call them.

Link: https://lkml.kernel.org/r/cover.1636989871.git.xhao@linux.alibaba.com
Link: https://lkml.kernel.org/r/529054aed932a42b9c09fc9977ad4574b9e7b0bd.1636989871.git.xhao@linux.alibaba.comSigned-off-by: default avatarXin Hao <xhao@linux.alibaba.com>
Reviewed-by: default avatarSeongJae Park <sj@kernel.org>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 87c01d57
...@@ -410,7 +410,7 @@ static void damon_va_mkold(struct mm_struct *mm, unsigned long addr) ...@@ -410,7 +410,7 @@ static void damon_va_mkold(struct mm_struct *mm, unsigned long addr)
* Functions for the access checking of the regions * Functions for the access checking of the regions
*/ */
static void damon_va_prepare_access_check(struct damon_ctx *ctx, static void __damon_va_prepare_access_check(struct damon_ctx *ctx,
struct mm_struct *mm, struct damon_region *r) struct mm_struct *mm, struct damon_region *r)
{ {
r->sampling_addr = damon_rand(r->ar.start, r->ar.end); r->sampling_addr = damon_rand(r->ar.start, r->ar.end);
...@@ -429,7 +429,7 @@ void damon_va_prepare_access_checks(struct damon_ctx *ctx) ...@@ -429,7 +429,7 @@ void damon_va_prepare_access_checks(struct damon_ctx *ctx)
if (!mm) if (!mm)
continue; continue;
damon_for_each_region(r, t) damon_for_each_region(r, t)
damon_va_prepare_access_check(ctx, mm, r); __damon_va_prepare_access_check(ctx, mm, r);
mmput(mm); mmput(mm);
} }
} }
...@@ -515,7 +515,7 @@ static bool damon_va_young(struct mm_struct *mm, unsigned long addr, ...@@ -515,7 +515,7 @@ static bool damon_va_young(struct mm_struct *mm, unsigned long addr,
* mm 'mm_struct' for the given virtual address space * mm 'mm_struct' for the given virtual address space
* r the region to be checked * r the region to be checked
*/ */
static void damon_va_check_access(struct damon_ctx *ctx, static void __damon_va_check_access(struct damon_ctx *ctx,
struct mm_struct *mm, struct damon_region *r) struct mm_struct *mm, struct damon_region *r)
{ {
static struct mm_struct *last_mm; static struct mm_struct *last_mm;
...@@ -551,7 +551,7 @@ unsigned int damon_va_check_accesses(struct damon_ctx *ctx) ...@@ -551,7 +551,7 @@ unsigned int damon_va_check_accesses(struct damon_ctx *ctx)
if (!mm) if (!mm)
continue; continue;
damon_for_each_region(r, t) { damon_for_each_region(r, t) {
damon_va_check_access(ctx, mm, r); __damon_va_check_access(ctx, mm, r);
max_nr_accesses = max(r->nr_accesses, max_nr_accesses); max_nr_accesses = max(r->nr_accesses, max_nr_accesses);
} }
mmput(mm); mmput(mm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment