All of lore.kernel.org
 help / color / mirror / Atom feed
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 v5.2 11/11] selftests/damon/sysfs.py: test failed region quota charge ratio
Date: Sun, 12 Apr 2026 09:19:54 -0700	[thread overview]
Message-ID: <20260412161957.82835-12-sj@kernel.org> (raw)
In-Reply-To: <20260412161957.82835-1-sj@kernel.org>

Extend sysfs.py DAMON selftest to setup DAMOS action failed region quota
charge ratio and assert the setup is made into DAMON internal state.

Signed-off-by: SeongJae Park <sj@kernel.org>
---
 tools/testing/selftests/damon/sysfs.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/testing/selftests/damon/sysfs.py b/tools/testing/selftests/damon/sysfs.py
index 387286dc449d5..cd4d82c852113 100755
--- a/tools/testing/selftests/damon/sysfs.py
+++ b/tools/testing/selftests/damon/sysfs.py
@@ -73,6 +73,10 @@ def assert_quota_committed(quota, dump):
             }
     assert_true(dump['goal_tuner'] == tuner_val[quota.goal_tuner],
                 'goal_tuner', dump)
+    assert_true(dump['fail_charge_num'] == quota.fail_charge_num,
+                'fail_charge_num', dump)
+    assert_true(dump['fail_charge_denom'] == quota.fail_charge_denom,
+                'fail_charge_denom', 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)
@@ -278,6 +282,8 @@ def main():
                         nid=1)],
                     goal_tuner='temporal',
                     reset_interval_ms=1500,
+                    fail_charge_num=1,
+                    fail_charge_denom=4096,
                     weight_sz_permil=20,
                     weight_nr_accesses_permil=200,
                     weight_age_permil=1000),
-- 
2.47.3

  parent reply	other threads:[~2026-04-12 16:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-12 16:19 [RFC PATCH v5.2 00/11] mm/damon: introduce DAMOS failed region quota charge ratio SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 01/11] mm/damon/core: handle <min_region_sz remaining quota as empty SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 02/11] mm/damon/core: merge regions after applying DAMOS schemes SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 03/11] mm/damon/core: introduce failed region quota charge ratio SeongJae Park
2026-04-12 18:07   ` (sashiko review) " SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 04/11] mm/damon/sysfs-schemes: implement fail_charge_{num,denom} files SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 05/11] Docs/mm/damon/design: document fail_charge_{num,denom} SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 06/11] Docs/admin-guide/mm/damon/usage: document fail_charge_{num,denom} files SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 07/11] Docs/ABI/damon: document fail_charge_{num,denom} SeongJae Park
2026-04-12 18:10   ` (sashiko review) " SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 08/11] mm/damon/tests/core-kunit: test fail_charge_{num,denom} committing SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 09/11] selftests/damon/_damon_sysfs: support failed region quota charge ratio SeongJae Park
2026-04-12 16:19 ` [RFC PATCH v5.2 10/11] selftests/damon/drgn_dump_damon_status: " SeongJae Park
2026-04-12 16:19 ` SeongJae Park [this message]
2026-04-12 18:14 ` (sashiko status) [RFC PATCH v5.2 00/11] mm/damon: introduce DAMOS " 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=20260412161957.82835-12-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 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.