[RFC v2 3/7] mm/damon/vaddr: implement eligible_report()
From: SeongJae Park
Date: Sun Jul 27 2025 - 16:18:46 EST
Implement eligible_report() operation for vaddr operation set. It
checks the eligibility of the report based on the pid of the report and
the current monitoring target.
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
mm/damon/vaddr.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index 87e825349bdf..a80cd34e5232 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -792,6 +792,12 @@ static int damos_va_migrate_pte_entry(pte_t *pte, unsigned long addr,
return 0;
}
+static bool damon_va_eligible_report(struct damon_access_report *report,
+ struct damon_target *t)
+{
+ return report->pid == t->pid;
+}
+
/*
* Functions for the target validity check and cleanup
*/
@@ -954,6 +960,7 @@ static int __init damon_va_initcall(void)
.update = damon_va_update,
.prepare_access_checks = damon_va_prepare_access_checks,
.check_accesses = damon_va_check_accesses,
+ .eligible_report = damon_va_eligible_report,
.target_valid = damon_va_target_valid,
.cleanup_target = damon_va_cleanup_target,
.cleanup = NULL,
--
2.39.5