DAMON development mailing list
 help / color / mirror / Atom feed
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 3/7] mm/damon/core: support probe_hits_wsum damos core filter
Date: Wed,  9 Sep 2026 21:20:26 -0700	[thread overview]
Message-ID: <20260910042027.149206-1-sj@kernel.org> (raw)
In-Reply-To: <20260910041647.9CE271F000FF@smtp.kernel.org>

On Thu, 10 Sep 2026 04:16:47 +0000 sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Low] Missing kunit test coverage for the newly added DAMOS_FILTER_TYPE_PROBE_HITS_WSUM filter.
> - [Low] The kerneldoc for `enum damos_filter_type` was not updated to reflect that `DAMOS_FILTER_TYPE_PROBE_HITS_WSUM` is a core layer filter.
> --
> 
> commit 3af974fc20158a639272fd766ad727c8d30c0f3e
> Author: SJ Park <sj@kernel.org>
> 
> mm/damon/core: support probe_hits_wsum damos core filter
> 
> Implement probe_hits_wsum DAMOS core filter support in the core layer.
> Make three small changes for the support: update damos_filter_for_ops() to
> treat probe_hits_wsum filter as core filter, update destination
> damos_filter->range_{min,max} for probe_hits_wsum, and extend
> damos_filter_match() to handle the new filter type.
> 
> > diff --git a/mm/damon/core.c b/mm/damon/core.c
> > index e9630f41e51fe..d9d56f4be1a97 100644
> > --- a/mm/damon/core.c
> > +++ b/mm/damon/core.c
> > @@ -658,6 +658,7 @@ bool damos_filter_for_ops(enum damos_filter_type type)
> >  	switch (type) {
> >  	case DAMOS_FILTER_TYPE_ADDR:
> >  	case DAMOS_FILTER_TYPE_TARGET:
> > +	case DAMOS_FILTER_TYPE_PROBE_HITS_WSUM:
> 
> [Severity: Low]
> Does the kerneldoc for enum damos_filter_type need to be updated to reflect
> that DAMOS_FILTER_TYPE_PROBE_HITS_WSUM is a core layer filter?
> 
> include/linux/damon.h:enum damos_filter_type {
>  * All types except &DAMOS_FILTER_TYPE_ADDR and &DAMOS_FILTER_TYPE_TARGET
>  * are handled by the underlying &struct damon_operations as a part of scheme
>  * action trying, and therefore accounted as 'tried'.
> 
> The documentation here explicitly lists only ADDR and TARGET as exceptions,
> failing to update the list with the newly added PROBE_HITS_WSUM core filter.

Yes, I will update so in the next revision.

> 
> >  		return false;
> >  	default:
> >  		break;
> 
> [ ... ]
> 
> > @@ -1332,6 +1333,10 @@ static void damos_commit_filter_arg(
> >  	case DAMOS_FILTER_TYPE_HUGEPAGE_SIZE:
> >  		dst->sz_range = src->sz_range;
> >  		break;
> > +	case DAMOS_FILTER_TYPE_PROBE_HITS_WSUM:
> > +		dst->range_min = src->range_min;
> > +		dst->range_max = src->range_max;
> > +		break;
> 
> [Severity: Low]
> Is there missing KUnit test coverage for the newly added
> DAMOS_FILTER_TYPE_PROBE_HITS_WSUM filter?
> 
> The copying logic for the new filter type's arguments (range_min, range_max)
> is left untested, which could hide future regressions.
> 
> In mm/damon/tests/core-kunit.h:damos_test_commit_filter_for(), the switch
> statement verifies filter argument copying but is missing the case for
> DAMOS_FILTER_TYPE_PROBE_HITS_WSUM:
> 
> 	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;
> 	}
> 
> Additionally, in mm/damon/tests/core-kunit.h:damos_test_commit_filter(),
> the function enumerates all filter types for testing but fails to include
> instances of DAMOS_FILTER_TYPE_PROBE_HITS_WSUM:
> 
> 	damos_test_commit_filter_for(test, &dst,
> 			&(struct damos_filter){
> 			.type = DAMOS_FILTER_TYPE_TARGET,
> 			.matching = true,
> 			.allow = true,
> 			.target_idx = 6,
> 			});

Good callout.  But definitely not a blocker of this series.  I will consider
adding such tests as a followup.

> 
> >  	default:
> >  		break;
> >  	}
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20260910040319.147037-1-sj@kernel.org?part=3
> 


Thanks,
SJ

  reply	other threads:[~2026-09-10  4:20 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 [this message]
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
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=20260910042027.149206-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox