[RFC PATCH 01/27] mm/damon/api: introduce struct damon_report

From: SJ Park

Date: Sun Nov 15 2026 - 15:29:16 EST


Define a struct for data attribute report. The struct provides public
fields for the type and the memory address range. The type field
represents the type of the report itself. The address range is for the
memory of the reporting data. Data attribute producers can format their
report using those fields.

It also has a private field representing when the report is submitted.

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

diff --git a/include/linux/damon.h b/include/linux/damon.h
index 06bd92981af21..5c32ddebf4625 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -751,6 +751,29 @@ struct damon_intervals_goal {
unsigned long max_sample_us;
};

+/**
+ * enum damon_report_type - Type of &struct damon_report.
+ */
+enum damon_report_type {
+ NR_DAMON_REPORT_TYPES,
+};
+
+/**
+ * struct damon_report - Data attribute report information.
+ *
+ * @type: Type of the report.
+ * @addr_range: The address range of the memory to report for.
+ *
+ * Note that the @start_addr and @end_adr represents an end-open range.
+ */
+struct damon_report {
+ enum damon_report_type type;
+ struct damon_addr_range addr_range;
+/* private: */
+ /* when this report is generated */
+ unsigned long jiffies;
+};
+
/**
* enum damon_prep_action - DAMON probing preparation action.
*
--
2.47.3