[RFC PATCH v3 13/37] mm/damon: extend damon_access_report for origin CPU reporting

SeongJae Park
2025-12-08T06:30:10Z

Add a field to damon_access_report that can be used to report which CPU
has made the reporting access.

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

diff --git a/include/linux/damon.h b/include/linux/damon.h
index b04c2e36833a..e23a10ba7c92 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -115,6 +115,7 @@ struct damon_target {
* struct damon_access_report - Represent single acces report information.
* @addr: The start address of the accessed address range.
* @size: The size of the accessed address range.
+ * @cpu: The id of the CPU that made the access.
*
* Any DAMON API callers that notified access events can report the information
* to DAMON using damon_report_access(). This struct contains the reporting
@@ -123,6 +124,7 @@ struct damon_target {
struct damon_access_report {
unsigned long addr;
unsigned long size;
+ unsigned int cpu;
/* private: */
unsigned long report_jiffies; /* when this report is made */
};
--
2.47.3