From: Ravi Jonnalagadda <ravis.opensrc@gmail.com>
To: damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Cc: sj@kernel.org, akpm@linux-foundation.org, corbet@lwn.net,
bijan311@gmail.com, ajayjoshi@micron.com,
Ravi Jonnalagadda <ravis.opensrc@gmail.com>
Subject: [RFC PATCH 5/5] mm/damon/sysfs-schemes: accept "node_sys_bp" in goal's target_metric
Date: Thu, 22 Jan 2026 20:57:28 -0800 [thread overview]
Message-ID: <20260123045733.6954-6-ravis.opensrc@gmail.com> (raw)
In-Reply-To: <20260123045733.6954-1-ravis.opensrc@gmail.com>
Allow userspace to select the new goal metric "node_sys_bp" by writing
it to goals/<G>/target_metric. Also set goal->nid for this metric when
committing goals from sysfs to the running schemes.
Signed-off-by: Ravi Jonnalagadda <ravis.opensrc@gmail.com>
---
mm/damon/sysfs-schemes.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c
index 3a699dcd5a7f..37cd5d715821 100644
--- a/mm/damon/sysfs-schemes.c
+++ b/mm/damon/sysfs-schemes.c
@@ -1038,6 +1038,10 @@ struct damos_sysfs_qgoal_metric_name damos_sysfs_qgoal_metric_names[] = {
.metric = DAMOS_QUOTA_NODE_MEMCG_FREE_BP,
.name = "node_memcg_free_bp",
},
+ {
+ .metric = DAMOS_QUOTA_NODE_SYS_BP,
+ .name = "node_sys_bp",
+ },
};
static ssize_t target_metric_show(struct kobject *kobj,
@@ -2566,6 +2570,9 @@ static int damos_sysfs_add_quota_score(
}
goal->nid = sysfs_goal->nid;
break;
+ case DAMOS_QUOTA_NODE_SYS_BP:
+ goal->nid = sysfs_goal->nid;
+ break;
default:
break;
}
--
2.43.0
next prev parent reply other threads:[~2026-01-23 4:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 4:57 [RFC PATCH 0/5] mm/damon: Add node_sys_bp quota goal metric for PA-based migration control Ravi Jonnalagadda
2026-01-23 4:57 ` [RFC PATCH 1/5] mm/damon/core: add DAMOS_QUOTA_NODE_SYS_BP metric Ravi Jonnalagadda
2026-01-23 4:57 ` [RFC PATCH 2/5] mm/damon: add get_goal_metric() op and PA provider Ravi Jonnalagadda
2026-01-23 4:57 ` [RFC PATCH 3/5] mm/damon/core: add new ops-specific goal metric Ravi Jonnalagadda
2026-01-23 4:57 ` [RFC PATCH 4/5] mm/damon/paddr: capacity clamp and directional early-exit for node_sys_bp Ravi Jonnalagadda
2026-01-23 4:57 ` Ravi Jonnalagadda [this message]
2026-01-24 1:50 ` [RFC PATCH 0/5] mm/damon: Add node_sys_bp quota goal metric for PA-based migration control SeongJae Park
2026-01-27 18:52 ` Ravi Jonnalagadda
2026-01-28 1:25 ` SeongJae Park
2026-02-12 6:27 ` SeongJae Park
2026-02-04 2:25 ` [RFC PATCH 0/5] mm/damon: Add node_sys_bp quota goal metric for Yunjeong Mun
2026-02-04 6:06 ` SeongJae Park
2026-02-12 6:30 ` 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=20260123045733.6954-6-ravis.opensrc@gmail.com \
--to=ravis.opensrc@gmail.com \
--cc=ajayjoshi@micron.com \
--cc=akpm@linux-foundation.org \
--cc=bijan311@gmail.com \
--cc=corbet@lwn.net \
--cc=damon@lists.linux.dev \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox