All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: damon@lists.linux.dev
Cc: linux-perf-users@vger.kernel.org, sj@kernel.org, akinobu.mita@gmail.com
Subject: [RFC PATCH v2 2/6] mm/damon/core: introduce struct damon_access_report
Date: Mon,  9 Mar 2026 10:00:05 +0900	[thread overview]
Message-ID: <20260309010009.11639-3-akinobu.mita@gmail.com> (raw)
In-Reply-To: <20260309010009.11639-1-akinobu.mita@gmail.com>

The struct damon_access_report is borrowed from SeongJae Park's
DAMON extension project [1].

[1] https://lore.kernel.org/linux-mm/20251208062943.68824-6-sj@kernel.org/T/
---
 include/linux/damon.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/include/linux/damon.h b/include/linux/damon.h
index 49d2983af4a8..5f2870ae02ba 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -110,6 +110,30 @@ struct damon_target {
 	bool obsolete;
 };
 
+/**
+ * struct damon_access_report - Represent single acces report information.
+ * @paddr:		Start physical address of the accessed address range.
+ * @vaddr:		Start virtual address of the accessed address range.
+ * @size:		The size of the accessed address range.
+ * @cpu:		The id of the CPU that made the access.
+ * @tid:		The task id of the task that made the access.
+ * @is_write:		Whether the access is write.
+ *
+ * Any DAMON API callers that notified access events can report the information
+ * to DAMON using damon_report_access().  This struct contains the reporting
+ * infomration.  Refer to damon_report_access() for more details.
+ */
+struct damon_access_report {
+	unsigned long paddr;
+	unsigned long vaddr;
+	unsigned long size;
+	unsigned int cpu;
+	pid_t tid;
+	bool is_write;
+/* private: */
+	unsigned long report_jiffies;	/* when this report is made */
+};
+
 /**
  * enum damos_action - Represents an action of a Data Access Monitoring-based
  * Operation Scheme.
-- 
2.43.0


  parent reply	other threads:[~2026-03-09  1:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09  1:00 [RFC PATCH v2 0/6] mm/damon: introduce perf event based access check Akinobu Mita
2026-03-09  1:00 ` [RFC PATCH v2 1/6] mm/damon: reintroduce damon_operations->cleanup() Akinobu Mita
2026-03-09  1:00 ` Akinobu Mita [this message]
2026-03-09 15:19   ` [RFC PATCH v2 2/6] mm/damon/core: introduce struct damon_access_report Ian Rogers
2026-03-10  1:23     ` SeongJae Park
2026-03-09  1:00 ` [RFC PATCH v2 3/6] mm/damon/core: add common code for perf event based access check Akinobu Mita
2026-03-09  1:00 ` [RFC PATCH v2 4/6] mm/damon/vaddr: support " Akinobu Mita
2026-03-09  1:00 ` [RFC PATCH v2 5/6] mm/damon/paddr: " Akinobu Mita
2026-03-09  1:00 ` [RFC PATCH v2 6/6] mm/damon: allow user to set min size of region Akinobu Mita
2026-03-11  0:51 ` [RFC PATCH v2 0/6] mm/damon: introduce perf event based access check SeongJae Park
2026-03-13  7:35   ` Akinobu Mita
2026-03-14  1:31     ` SeongJae Park
2026-03-16  4:42       ` Akinobu Mita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260309010009.11639-3-akinobu.mita@gmail.com \
    --to=akinobu.mita@gmail.com \
    --cc=damon@lists.linux.dev \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.