summaryrefslogtreecommitdiffstats
path: root/mm/damon/vaddr.c
diff options
context:
space:
mode:
authorKaixu Xia <kaixuxia@tencent.com>2022-08-27 17:02:50 +0800
committerAndrew Morton <akpm@linux-foundation.org>2022-09-11 20:26:04 -0700
commit09876ae73945ca69550ce2cbe0538de11997fd94 (patch)
tree1fa17ba7d654f5b13338426dc759893c35ad2305 /mm/damon/vaddr.c
parentb4a0215e11dcfe23a48c65c6d6c82c0c2c551a48 (diff)
downloadlinux-stable-09876ae73945ca69550ce2cbe0538de11997fd94.tar.gz
linux-stable-09876ae73945ca69550ce2cbe0538de11997fd94.tar.bz2
linux-stable-09876ae73945ca69550ce2cbe0538de11997fd94.zip
mm/damon: simplify the parameter passing for 'check_accesses'
Patch series "mm/damon: Simplify the damon regions access check", v2. This patchset simplifies the operations when checking the damon regions accesses. This patch (of 2): The parameter 'struct damon_ctx *ctx' isn't used in the functions __damon_{p,v}a_check_access(), so we can remove it and simplify the parameter passing. Link: https://lkml.kernel.org/r/1661590971-20893-1-git-send-email-kaixuxia@tencent.com Link: https://lkml.kernel.org/r/1661590971-20893-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index cc04d467ba23..34a72f5e13f5 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -542,8 +542,8 @@ static bool damon_va_young(struct mm_struct *mm, unsigned long addr,
* mm 'mm_struct' for the given virtual address space
* r the region to be checked
*/
-static void __damon_va_check_access(struct damon_ctx *ctx,
- struct mm_struct *mm, struct damon_region *r)
+static void __damon_va_check_access(struct mm_struct *mm,
+ struct damon_region *r)
{
static struct mm_struct *last_mm;
static unsigned long last_addr;
@@ -578,7 +578,7 @@ static unsigned int damon_va_check_accesses(struct damon_ctx *ctx)
if (!mm)
continue;
damon_for_each_region(r, t) {
- __damon_va_check_access(ctx, mm, r);
+ __damon_va_check_access(mm, r);
max_nr_accesses = max(r->nr_accesses, max_nr_accesses);
}
mmput(mm);