From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, kernel-team@meta.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [RFC v2 7/7] mm/damon/sysfs: support paddr_fault
Date: Sun, 27 Jul 2025 13:18:13 -0700 [thread overview]
Message-ID: <20250727201813.53858-8-sj@kernel.org> (raw)
In-Reply-To: <20250727201813.53858-1-sj@kernel.org>
Extend DAMON sysfs interface to support the page faults based physical
address space access monitoring. Users can use it by writing
paddr_fault to the ops file. For simple testing, the DAMON user-space
tool can be used as below, after applying below hack.
$ git diff
--- a/src/_damon_sysfs.py
+++ b/src/_damon_sysfs.py
@@ -548,7 +548,7 @@ def write_monitoring_attrs_dir(dir_path, context):
def write_context_dir(dir_path, context):
err = _damo_fs.write_file(os.path.join(dir_path, 'operations'),
- context.ops)
+ 'paddr_fault')
if err is not None:
return err
$ sudo ./damo start
$ sudo ./damo report access
Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/damon/sysfs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index 6d2b0dab50cb..b1bf43972491 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -829,6 +829,10 @@ static const struct damon_sysfs_ops_name damon_sysfs_ops_names[] = {
.ops_id = DAMON_OPS_PADDR,
.name = "paddr",
},
+ {
+ .ops_id = DAMON_OPS_PADDR_FAULT,
+ .name = "paddr_fault",
+ },
};
struct damon_sysfs_context {
--
2.39.5
next prev parent reply other threads:[~2025-07-27 20:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-27 20:18 [RFC v2 0/7] mm/damon: extend for page faults reporting based access monitoring SeongJae Park
2025-07-27 20:18 ` [RFC v2 1/7] mm/damon/core: introduce damon_report_access() SeongJae Park
2025-07-27 20:18 ` [RFC v2 2/7] mm/damon/core: add eligible_report() ops callback SeongJae Park
2025-07-27 20:18 ` [RFC v2 3/7] mm/damon/vaddr: implement eligible_report() SeongJae Park
2025-07-27 20:18 ` [RFC v2 4/7] mm/damon/core: read received access reports SeongJae Park
2025-07-27 20:18 ` [RFC v2 5/7] mm/memory: implement MM_CP_DAMON SeongJae Park
2025-07-28 5:19 ` Lorenzo Stoakes
2025-07-29 3:06 ` SeongJae Park
2025-07-29 9:40 ` Lorenzo Stoakes
2025-07-30 4:21 ` SeongJae Park
2025-07-31 12:18 ` Lorenzo Stoakes
2025-07-27 20:18 ` [RFC v2 6/7] mm/damon: implement paddr_fault operations set SeongJae Park
2025-07-27 20:18 ` SeongJae Park [this message]
2025-08-04 2:47 ` [RFC v2 0/7] mm/damon: extend for page faults reporting based access monitoring Andrew Paniakin
2025-08-04 16:57 ` SeongJae Park
2025-12-07 4:52 ` SeongJae Park
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=20250727201813.53858-8-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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.