* [merged mm-stable] selftests-damon-sysfspy-test-damos-filters-commitment.patch removed from -mm tree
@ 2025-07-26 22:10 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-07-26 22:10 UTC (permalink / raw)
To: mm-commits, shuah, sj, akpm
The quilt patch titled
Subject: selftests/damon/sysfs.py: test DAMOS filters commitment
has been removed from the -mm tree. Its filename was
selftests-damon-sysfspy-test-damos-filters-commitment.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: selftests/damon/sysfs.py: test DAMOS filters commitment
Date: Sun, 20 Jul 2025 10:16:47 -0700
Current DAMOS scheme commitment assertion is not testing DAMOS filters.
Add the test.
Link: https://lkml.kernel.org/r/20250720171652.92309-18-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tools/testing/selftests/damon/sysfs.py | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
--- a/tools/testing/selftests/damon/sysfs.py~selftests-damon-sysfspy-test-damos-filters-commitment
+++ a/tools/testing/selftests/damon/sysfs.py
@@ -80,6 +80,21 @@ def assert_migrate_dests_committed(dests
assert_true(dump['node_id_arr'][idx] == dest.id, 'node_id', dump)
assert_true(dump['weight_arr'][idx] == dest.weight, 'weight', dump)
+def assert_filter_committed(filter_, dump):
+ assert_true(filter_.type_ == dump['type'], 'type', dump)
+ assert_true(filter_.matching == dump['matching'], 'matching', dump)
+ assert_true(filter_.allow == dump['allow'], 'allow', dump)
+ # TODO: check memcg_path and memcg_id if type is memcg
+ if filter_.type_ == 'addr':
+ assert_true([filter_.addr_start, filter_.addr_end] ==
+ dump['addr_range'], 'addr_range', dump)
+ elif filter_.type_ == 'target':
+ assert_true(filter_.target_idx == dump['target_idx'], 'target_idx',
+ dump)
+ elif filter_.type_ == 'hugepage_size':
+ assert_true([filter_.min_, filter_.max_] == dump['sz_range'],
+ 'sz_range', dump)
+
def assert_access_pattern_committed(pattern, dump):
assert_true(dump['min_sz_region'] == pattern.size[0], 'min_sz_region',
dump)
@@ -115,6 +130,11 @@ def assert_scheme_committed(scheme, dump
assert_migrate_dests_committed(scheme.dests, dump['migrate_dests'])
assert_quota_committed(scheme.quota, dump['quota'])
assert_watermarks_committed(scheme.watermarks, dump['wmarks'])
+ # TODO: test filters directory
+ for idx, f in enumerate(scheme.core_filters.filters):
+ assert_filter_committed(f, dump['filters'][idx])
+ for idx, f in enumerate(scheme.ops_filters.filters):
+ assert_filter_committed(f, dump['ops_filters'][idx])
def main():
kdamonds = _damon_sysfs.Kdamonds(
_
Patches currently in -mm which might be from sj@kernel.org are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-26 22:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-26 22:10 [merged mm-stable] selftests-damon-sysfspy-test-damos-filters-commitment.patch removed from -mm tree Andrew Morton
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.