From: SJ Park <sj@kernel.org>
To: sashiko-bot@kernel.org
Cc: SJ Park <sj@kernel.org>, damon@lists.linux.dev
Subject: Re: [RFC PATCH v2.1 5/7] mm/damon/sysfs-schemes: support probe_hits_wsum damos core filter
Date: Wed, 9 Sep 2026 21:23:38 -0700 [thread overview]
Message-ID: <20260910042340.162267-1-sj@kernel.org> (raw)
In-Reply-To: <20260910041833.58BD81F000FF@smtp.kernel.org>
On Thu, 10 Sep 2026 04:18:33 +0000 sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] The commit introduces `DAMOS_FILTER_TYPE_PROBE_HITS_WSUM` to the core layer and updates `damos_commit_filter_arg()` to properly copy its state (`range_min` and `range_max`), but fails to update the corresponding KUnit tests that rigorously check this exact behavior.
> --
>
> commit 90fc8bb11dba04367743217a5b35954829f87d9c
> Author: SJ Park <sj@kernel.org>
>
> mm/damon/sysfs-schemes: support probe_hits_wsum damos core filter
>
> This commit extends the DAMON sysfs interface to support the probe_hits_wsum
> input for scheme core filters. It updates the scheme build logic to set up
> the min/max probe hits weighted sum range as provided by the user.
>
> > diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c
> > index 4d9147d2a269e..d9dd4ee0442c7 100644
> > --- a/mm/damon/sysfs-schemes.c
> > +++ b/mm/damon/sysfs-schemes.c
>
> [ ... ]
>
> > @@ -2844,6 +2847,14 @@ static int damon_sysfs_add_scheme_filters(struct damos *scheme,
> > }
> > filter->sz_range.min = sysfs_filter->range_min;
> > filter->sz_range.max = sysfs_filter->range_max;
> > + } else if (filter->type = DAMOS_FILTER_TYPE_PROBE_HITS_WSUM) {
> > + if (sysfs_filter->range_min >
> > + sysfs_filter->range_max) {
> > + damos_destroy_filter(filter);
> > + return -EINVAL;
> > + }
> > + filter->range_min = sysfs_filter->range_min;
> > + filter->range_max = sysfs_filter->range_max;
>
> [Severity: Low]
> Does the addition of this new filter type require an update to the core
> KUnit tests?
>
> In mm/damon/tests/core-kunit.h, there is a switch statement in
> damos_test_commit_filter_for() that checks parameter validation for each
> filter type:
>
> switch (src->type) {
> case DAMOS_FILTER_TYPE_MEMCG:
> ...
> case DAMOS_FILTER_TYPE_HUGEPAGE_SIZE:
> KUNIT_EXPECT_EQ(test, dst->sz_range.min, src->sz_range.min);
> KUNIT_EXPECT_EQ(test, dst->sz_range.max, src->sz_range.max);
> break;
> default:
> break;
> }
>
> Because DAMOS_FILTER_TYPE_PROBE_HITS_WSUM isn't handled here, it falls
> through to the default case, bypassing validation.
>
> Additionally, the orchestrating function damos_test_commit_filter() doesn't
> appear to have a test block for this new type. Should these KUnit tests be
> updated to maintain test coverage for the new feature?
It would be good to add a test, but not necessarily together with this series.
I will consider adding such tests as a followup in future.
>
> > }
> >
> > damos_add_filter(scheme, filter);
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260910040319.147037-1-sj@kernel.org?part=5
>
Thanks,
SJ
next prev parent reply other threads:[~2026-09-10 4:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 4:03 [RFC PATCH v2.1 0/7] mm/damon: introduce probe_hits_wsum DAMOS core filter SJ Park
2026-09-10 4:03 ` [RFC PATCH v2.1 1/7] mm/damon/api: introduce DAMOS_FILTER_TYPE_PROBE_HITS_WSUM SJ Park
2026-09-10 4:13 ` sashiko-bot
2026-09-10 4:17 ` SJ Park
2026-09-10 4:03 ` [RFC PATCH v2.1 2/7] mm/damon/core: extend probe_hits_wsum() for moving sum based calculation SJ Park
2026-09-10 4:08 ` sashiko-bot
2026-09-10 4:03 ` [RFC PATCH v2.1 3/7] mm/damon/core: support probe_hits_wsum damos core filter SJ Park
2026-09-10 4:16 ` sashiko-bot
2026-09-10 4:20 ` SJ Park
2026-09-10 4:03 ` [RFC PATCH v2.1 4/7] mm/damon/sysfs-schemes: rename sysfs_filter->sz_range to range_{min,max} SJ Park
2026-09-10 4:14 ` sashiko-bot
2026-09-10 4:03 ` [RFC PATCH v2.1 5/7] mm/damon/sysfs-schemes: support probe_hits_wsum damos core filter SJ Park
2026-09-10 4:18 ` sashiko-bot
2026-09-10 4:23 ` SJ Park [this message]
2026-09-10 4:03 ` [RFC PATCH v2.1 6/7] Docs/mm/damon/design: update for probe_hits_wsum DAMOS " SJ Park
2026-09-10 4:05 ` sashiko-bot
2026-09-10 4:03 ` [RFC PATCH v2.1 7/7] Docs/admin-guide/mm/damon/usage: update for probe_hits_wsum DAMOS filter SJ Park
2026-09-10 4:05 ` sashiko-bot
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=20260910042340.162267-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=damon@lists.linux.dev \
--cc=sashiko-bot@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.