DAMON development mailing list
 help / color / mirror / Atom feed
From: Kunwu Chan <kunwu.chan@gmail.com>
To: SJ Park <sj@kernel.org>
Cc: Kunwu Chan <kunwu.chan@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>,
	stable@vger.kernel.org,
	Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <davidgow@davidgow.net>,
	damon@lists.linux.dev, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-mm@kvack.org, Kunwu Chan <kunwu.chan@gmail.com>
Subject: Re: [PATCH 1/4] mm/damon/tests/core-kunit: test committing psi goal to psi goal
Date: Thu,  3 Sep 2026 16:33:18 +0800	[thread overview]
Message-ID: <20260903083319.451754-1-kunwu.chan@linux.dev> (raw)
In-Reply-To: <20260902002725.108635-2-sj@kernel.org>

On Tue,  1 Sep 2026 17:27:20 -0700 SJ Park <sj@kernel.org> wrote:

> damon_test_commit_quota_goal_for() is set to test committing a new psi
> goal on an existing psi goal.  However, damon_test_commit_quota_goal()
> is mistakenly not covering the test case.  Add the test case.
> 
> Fixes: 99f89debafc5 ("mm/damon/tests/core-kunit: add damos_commit_quota_goal() test")
> Cc: <stable@vger.kernel.org> # 6.19.x
> Signed-off-by: SJ Park <sj@kernel.org>
> ---
>  mm/damon/tests/core-kunit.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
> index 7071ec277b007..f1e11548c771b 100644
> --- a/mm/damon/tests/core-kunit.h
> +++ b/mm/damon/tests/core-kunit.h
> @@ -793,6 +793,13 @@ static void damos_test_commit_quota_goal(struct kunit *test)
>  		.last_psi_total = 456,
>  	};
>  
> +	damos_test_commit_quota_goal_for(test, &dst,
> +			&(struct damos_quota_goal) {
> +			.metric = DAMOS_QUOTA_SOME_MEM_PSI_US,
> +			.target_value = 234,
> +			.current_value = 345,
> +			.last_psi_total = 567,
> +			});
>  	damos_test_commit_quota_goal_for(test, &dst,
>  			&(struct damos_quota_goal){
>  			.metric = DAMOS_QUOTA_USER_INPUT,
> -- 
> 2.47.3
> 

Thanks SJ. The added case correctly exercises the PSI -> PSI commit 
path before the existing tests change the destination metric.

Reviewed-by: Kunwu Chan <kunwu.chan@gmail.com>

Thanks,
Kunwu


Sent using hkml (https://github.com/sjp38/hackermail)

  parent reply	other threads:[~2026-09-03  8:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  0:27 [PATCH 0/4] mm/damon: fix misc bugs in kunit, quota goals and sysfs refresh_ms SJ Park
2026-09-02  0:27 ` [PATCH 1/4] mm/damon/tests/core-kunit: test committing psi goal to psi goal SJ Park
2026-09-02  0:34   ` sashiko-bot
2026-09-03  8:33   ` Kunwu Chan [this message]
2026-09-02  0:27 ` [PATCH 2/4] mm/damon/core: handle uninitialized damos_quota_goal->last_psi_total SJ Park
2026-09-02  0:34   ` sashiko-bot
2026-09-03  9:23   ` Kunwu Chan
2026-09-02  0:27 ` [PATCH 3/4] mm/damon/core: copy nid for eligible_mem_bp damos quota goal commit SJ Park
2026-09-02  0:39   ` sashiko-bot
2026-09-02  1:13     ` SJ Park
2026-09-02  1:14   ` SJ Park
2026-09-03  8:45   ` Kunwu Chan
2026-09-03 13:49     ` SJ Park
2026-09-02  0:27 ` [PATCH 4/4] mm/damon/sysfs: set next refresh jiffies per sysfs context SJ Park
2026-09-02  0:39   ` sashiko-bot
2026-09-03 10:01   ` Kunwu Chan
2026-09-02  1:16 ` [PATCH 0/4] mm/damon: fix misc bugs in kunit, quota goals and sysfs refresh_ms SJ Park
2026-09-03  3:13 ` Lian Wang
2026-09-03 13:51   ` SJ 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=20260903083319.451754-1-kunwu.chan@linux.dev \
    --to=kunwu.chan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=brendan.higgins@linux.dev \
    --cc=damon@lists.linux.dev \
    --cc=davidgow@davidgow.net \
    --cc=kunit-dev@googlegroups.com \
    --cc=kunwu.chan@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sj@kernel.org \
    --cc=stable@vger.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