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 v1.2 3/4] mm/damon/core: copy nid for eligible_mem_bp damos quota goal commit
Date: Thu, 27 Aug 2026 19:23:10 -0700	[thread overview]
Message-ID: <20260828022311.122481-1-sj@kernel.org> (raw)
In-Reply-To: <20260828015635.1B2181F000E9@smtp.kernel.org>

On Fri, 28 Aug 2026 01:56:34 +0000 sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The KUnit tests in `mm/damon/tests/core-kunit.h` were not updated to verify the bug fix for the `DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP` metric.
> --
> 
> commit 2e3746fc6a44e14dd4bda23054c960b1e043e013
> Author: SJ Park <sj@kernel.org>
> 
> mm/damon/core: copy nid for eligible_mem_bp damos quota goal commit
> 
> damos_commit_quota_goal_union() does not update the nid union field when the
> goal metric is DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP. This commit adds the
> missing update to ensure it does not use a garbage nid value.
> 
> Link: https://lore.kkernel.org/20260827045035.94611-1-sj@kernel.org
> 
> > diff --git a/mm/damon/core.c b/mm/damon/core.c
> > index b0c8e22ab5404..086d2ac57259f 100644
> > --- a/mm/damon/core.c
> > +++ b/mm/damon/core.c
> > @@ -1136,6 +1136,9 @@ static void damos_commit_quota_goal_union(
> >  		dst->nid = src->nid;
> >  		dst->memcg_id = src->memcg_id;
> >  		break;
> > +	case DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP:
> > +		dst->nid = src->nid;
> > +		break;
> 
> [Severity: Medium]
> Since this case was added here, do we also need to update the corresponding
> KUnit tests in mm/damon/tests/core-kunit.h?
> 
> Currently, damos_test_commit_quota_goal_for() is missing the case for
> DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP:
> 
> mm/damon/tests/core-kunit.h:damos_test_commit_quota_goal_for() {
>     ...
> 	switch (dst->metric) {
> 	case DAMOS_QUOTA_SOME_MEM_PSI_US:
> 		KUNIT_EXPECT_EQ(test, dst->last_psi_total, U64_MAX);
> 		break;
> 	case DAMOS_QUOTA_NODE_MEM_USED_BP:
> 	case DAMOS_QUOTA_NODE_MEM_FREE_BP:
> 		KUNIT_EXPECT_EQ(test, dst->nid, src->nid);
> 		break;
> 	case DAMOS_QUOTA_NODE_MEMCG_USED_BP:
> 	case DAMOS_QUOTA_NODE_MEMCG_FREE_BP:
> 		KUNIT_EXPECT_EQ(test, dst->nid, src->nid);
> 		KUNIT_EXPECT_EQ(test, dst->memcg_id, src->memcg_id);
> 		break;
> 	default:
> 		break;
> 	}
> }
> 
> Should a test case for DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP also be added
> to damos_test_commit_quota_goal() to ensure the fix is validated?

I'm working on this in a stealth mode ;)  Will post as a separate series, since
it is definitely not a fix.

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


Thanks,
SJ

  reply	other threads:[~2026-08-28  2:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28  1:46 [RFC PATCH v1.2 0/4] mm/damon: fix misc bugs in kunit, quota goals and sysfs refresh_ms SJ Park
2026-08-28  1:46 ` [RFC PATCH v1.2 1/4] mm/damon/tests/core-kunit: test committing psi goal to psi goal SJ Park
2026-08-28  1:54   ` sashiko-bot
2026-08-28  1:46 ` [RFC PATCH v1.2 2/4] mm/damon/core: handle uninitialized damos_quota_goal->last_psi_total SJ Park
2026-08-28  1:55   ` sashiko-bot
2026-08-28  2:22     ` SJ Park
2026-08-28  1:46 ` [RFC PATCH v1.2 3/4] mm/damon/core: copy nid for eligible_mem_bp damos quota goal commit SJ Park
2026-08-28  1:56   ` sashiko-bot
2026-08-28  2:23     ` SJ Park [this message]
2026-08-28  1:46 ` [RFC PATCH v1.2 4/4] mm/damon/sysfs: set next refresh jiffies per sysfs context SJ Park
2026-08-28  1:57   ` 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=20260828022311.122481-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