diff options
author | Kaixu Xia <kaixuxia@tencent.com> | 2022-09-13 11:11:24 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-03 23:03:13 +0200 |
commit | 8ef4d5caa66d62b3b87a14d01562fb487651df2e (patch) | |
tree | 6e885d15999e9d0186827faf9dfb6441ac925759 /mm/damon/vaddr.c | |
parent | mm/damon/lru_sort: deduplicate hot/cold schemes generators (diff) | |
download | linux-8ef4d5caa66d62b3b87a14d01562fb487651df2e.tar.xz linux-8ef4d5caa66d62b3b87a14d01562fb487651df2e.zip |
mm/damon: simplify the parameter passing for 'prepare_access_checks'
Patch series "mm/damon: code simplifications and cleanups".
This patchset contains some code simplifications and cleanups for DAMON.
This patch (of 4):
The parameter 'struct damon_ctx *ctx' isn't used in the functions
__damon_{p,v}a_prepare_access_check(), so we can remove it and simplify
the parameter passing.
Link: https://lkml.kernel.org/r/1663060287-30201-1-git-send-email-kaixuxia@tencent.com
Link: https://lkml.kernel.org/r/1663060287-30201-2-git-send-email-kaixuxia@tencent.com
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon/vaddr.c')
-rw-r--r-- | mm/damon/vaddr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c index 0eae47bd9ccb..3f84584f9982 100644 --- a/mm/damon/vaddr.c +++ b/mm/damon/vaddr.c @@ -397,8 +397,8 @@ static void damon_va_mkold(struct mm_struct *mm, unsigned long addr) * Functions for the access checking of the regions */ -static void __damon_va_prepare_access_check(struct damon_ctx *ctx, - struct mm_struct *mm, struct damon_region *r) +static void __damon_va_prepare_access_check(struct mm_struct *mm, + struct damon_region *r) { r->sampling_addr = damon_rand(r->ar.start, r->ar.end); @@ -416,7 +416,7 @@ static void damon_va_prepare_access_checks(struct damon_ctx *ctx) if (!mm) continue; damon_for_each_region(r, t) - __damon_va_prepare_access_check(ctx, mm, r); + __damon_va_prepare_access_check(mm, r); mmput(mm); } } |