[RFC PATCH 5/6] mm/damon: add node_id to damon_access_report

From: SeongJae Park
Date: Sun Jun 29 2025 - 16:15:41 EST


In future, per-CPU or per-NUMA node monitoring might be required. We
can add the information in damon_access_report and implement the
damon_report_access() callers filling the information. And the new
operations set implementation for the per-CPU or per-NUMA node access
monitoring can show and ignore unnecessary reports via
damon_operations->eligible_report() callback.

This commit is for showing the first part of the idea.

Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
include/linux/damon.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/linux/damon.h b/include/linux/damon.h
index 9ec40ce7dde0..29223fea710f 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -111,6 +111,7 @@ struct damon_target {
* @addr: The start address of the reporting region.
* @size: The size of the reporting region.
* @nr_accesses: Number of detected accesses to the region.
+ * @node_id: NUMA node that made the access.
*
* @pid could be stale, and hence shouldn't be de-referenced.
*/
@@ -119,6 +120,7 @@ struct damon_access_report {
unsigned long addr;
unsigned long size;
int nr_accesses;
+ int node_id;
/* private: */
unsigned long report_jiffies; /* when this report is made */
};
--
2.39.5