Re: [RFC PATCH v3 2/4] mm/damon: Generalize ctx_target creation for damon_ops_id and add vaddr support
From: SeongJae Park
Date: Thu Jun 04 2026 - 20:50:35 EST
On Thu, 4 Jun 2026 15:03:35 +0000 <gutierrez.asier@xxxxxxxxxxxxxxxxxxx> wrote:
> From: Asier Gutierrez <gutierrez.asier@xxxxxxxxxxxxxxxxxxx>
>
> This patch adds a new function damon_modules_new_vaddr_ctx_target.
> Since ctx_target creation for vaddr and paddr is almost
> identical, the logic is extracted to a new function,
> damon_modules_new_ctx_target, and vaddr and paddr functions
> are left just as interfaces.
>
> This change was suggested earlier1 and it is needed to allow
> developers to create DAMON modules that use DAMON_OPS_VADDR targets.
>
> Signed-off-by: Asier Gutierrez <gutierrez.asier@xxxxxxxxxxxxxxxxxxx>
> Suggested-by: SeongJae Park <sj@xxxxxxxxxx>
> ---
> mm/damon/modules-common.c | 31 +++++++++++++++++++++++++++----
> mm/damon/modules-common.h | 3 +++
> 2 files changed, 30 insertions(+), 4 deletions(-)
This change is for the sample module that will be introduced by the third patch
of this series, right?
I'd like sample modules to be simple and completely isolated under sample/
directory. Is this change really required for the sammple directory? If not,
could we please drop this patch?
Thanks,
SJ
[...]