Re: [RFC PATCH v1 1/1] mm/damon: generalize ctx_target creation for damon_ops_id and add vaddr support
From: Gutierrez Asier
Date: Tue Apr 14 2026 - 07:08:34 EST
Hi SJ,
On 4/14/2026 3:47 AM, SeongJae Park wrote:
> 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?
Right, I missed that.
> 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.
Fair enough. I will carry on working on the module for hugepages autotuning,
which will use this function. I will resubmit this along with the caller.
>>
>> [1]: https://lore.kernel.org/damon/20260311005759.90440-1-sj@xxxxxxxxxx/
>
>
> Thanks,
> SJ
>
> [...]
--
Asier Gutierrez
Huawei