The patch titled Subject: mm/damon: simplify the parameter passing for 'check_accesses' has been added to the -mm mm-unstable branch. Its filename is mm-damon-simplify-the-parameter-passing-for-check_accesses.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-simplify-the-parameter-passing-for-check_accesses.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Kaixu Xia <kaixuxia@xxxxxxxxxxx> Subject: mm/damon: simplify the parameter passing for 'check_accesses' Date: Sat, 27 Aug 2022 17:02:50 +0800 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@xxxxxxxxxxx Link: https://lkml.kernel.org/r/1661590971-20893-2-git-send-email-kaixuxia@xxxxxxxxxxx Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx> Reviewed-by: SeongJae Park <sj@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/damon/paddr.c | 5 ++--- mm/damon/vaddr.c | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) --- a/mm/damon/paddr.c~mm-damon-simplify-the-parameter-passing-for-check_accesses +++ a/mm/damon/paddr.c @@ -166,8 +166,7 @@ out: return result.accessed; } -static void __damon_pa_check_access(struct damon_ctx *ctx, - struct damon_region *r) +static void __damon_pa_check_access(struct damon_region *r) { static unsigned long last_addr; static unsigned long last_page_sz = PAGE_SIZE; @@ -196,7 +195,7 @@ static unsigned int damon_pa_check_acces damon_for_each_target(t, ctx) { damon_for_each_region(r, t) { - __damon_pa_check_access(ctx, r); + __damon_pa_check_access(r); max_nr_accesses = max(r->nr_accesses, max_nr_accesses); } } --- a/mm/damon/vaddr.c~mm-damon-simplify-the-parameter-passing-for-check_accesses +++ a/mm/damon/vaddr.c @@ -543,8 +543,8 @@ static bool damon_va_young(struct mm_str * 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; @@ -579,7 +579,7 @@ static unsigned int damon_va_check_acces 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); _ Patches currently in -mm which might be from kaixuxia@xxxxxxxxxxx are mm-damon-core-simplify-the-parameter-passing-for-region-split-operation.patch mm-damon-simplify-the-parameter-passing-for-check_accesses.patch mm-damon-vaddr-remove-comparison-between-mm-and-last_mm-when-checking-region-accesses.patch