From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>, Shuah Khan <shuah@kernel.org>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-mm@kvack.org
Subject: [RFC PATCH v2 10/10] selftests/damon/sysfs.py: test goal_tuner commit
Date: Tue, 3 Mar 2026 20:41:19 -0800 [thread overview]
Message-ID: <20260304044122.79394-11-sj@kernel.org> (raw)
In-Reply-To: <20260304044122.79394-1-sj@kernel.org>
Extend the near-full DAMON parameters commit selftest to commit
goal_tuner and confirm the internal status is updated as expected.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
tools/testing/selftests/damon/sysfs.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/damon/sysfs.py b/tools/testing/selftests/damon/sysfs.py
index 9cca71eb0325e..3aa5c91548a53 100755
--- a/tools/testing/selftests/damon/sysfs.py
+++ b/tools/testing/selftests/damon/sysfs.py
@@ -67,6 +67,12 @@ def assert_quota_committed(quota, dump):
assert_true(dump['sz'] == quota.sz, 'sz', dump)
for idx, qgoal in enumerate(quota.goals):
assert_quota_goal_committed(qgoal, dump['goals'][idx])
+ tuner_val = {
+ 'consist': 0,
+ 'temporal': 1,
+ }
+ assert_true(dump['goal_tuner'] == tuner_val[quota.goal_tuner],
+ 'goal_tuner', dump)
assert_true(dump['weight_sz'] == quota.weight_sz_permil, 'weight_sz', dump)
assert_true(dump['weight_nr_accesses'] == quota.weight_nr_accesses_permil,
'weight_nr_accesses', dump)
@@ -231,6 +237,7 @@ def main():
metric='node_mem_used_bp',
target_value=9950,
nid=1)],
+ goal_tuner='temporal',
reset_interval_ms=1500,
weight_sz_permil=20,
weight_nr_accesses_permil=200,
--
2.47.3
prev parent reply other threads:[~2026-03-04 4:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 4:41 [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 01/10] mm/damon/core: introduce damos_quota_goal_tuner SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 02/10] mm/damon/core: allow quota goals set zero effective size quota SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 03/10] mm/damon/core: introduce DAMOS_QUOTA_GOAL_TUNER_TEMPORAL SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 04/10] mm/damon/sysfs-schemes: implement quotas->goal_tuner file SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 05/10] Docs/mm/damon/design: document the goal-based quota tuner selections SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 06/10] Docs/admin-guide/mm/damon/usage: document goal_tuner sysfs file SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 07/10] Docs/ABI/damon: update for goal_tuner SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 08/10] selftests/damon/_damon_sysfs: support goal_tuner setup SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 09/10] selftests/damon/drgn_dump_damon_status: support quota goal_tuner dumping SeongJae Park
2026-03-04 4:41 ` SeongJae Park [this message]
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=20260304044122.79394-11-sj@kernel.org \
--to=sj@kernel.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@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