Re: [RFC PATCH v1 1/1] mm/damon: generalize ctx_target creation for damon_ops_id and add vaddr support

From: SeongJae Park

Date: Mon Apr 13 2026 - 20:47:53 EST


On Mon, 13 Apr 2026 14:59:43 +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 earlier[1] and it is needed to allow
> developers to create DAMON modules that use DAMON_OPS_PADDR targets.

You mean DAMON_OPS_VADDR?

And I agree this can be useful if we will make a DAMON module that runs for
virtual address spaces. But we don't add new functions without their callers.
So this patch should be submitted only together with the caller of the
function.

>
> [1]: https://lore.kernel.org/damon/20260311005759.90440-1-sj@xxxxxxxxxx/


Thanks,
SJ

[...]