All of lore.kernel.org
 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 08/10] selftests/damon/sysfs.sh: test hugepage_mem_bp quota goal
Date: Mon, 27 Jul 2026 22:56:05 -0700	[thread overview]
Message-ID: <20260728055606.211413-1-sj@kernel.org> (raw)
In-Reply-To: <20260728053533.B293F1F000E9@smtp.kernel.org>

On Tue, 28 Jul 2026 05:35:33 +0000 sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The selftest unconditionally fails because the kernel implementation for the 'hugepage_mem_bp' quota goal target metric is missing.
> --
> 
> --- Patch [8]: [RFC PATCH 08/10] selftests/damon/sysfs.sh: test hugepage_mem_bp quota goal ---
> commit 033ea051e9d9dfb2787f833f5569853c4af61194
> Author: SJ Park <sj@kernel.org>
> 
> selftests/damon/sysfs.sh: test hugepage_mem_bp quota goal
> 
> DAMON sysfs quota goal target_metric file now accepts 'hugepage_mem_bp'
> input. Test it is accepted in fundamental DAMON sysfs file operation
> selftest.
> 
> > diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh
> > --- a/tools/testing/selftests/damon/sysfs.sh
> > +++ b/tools/testing/selftests/damon/sysfs.sh
> > @@ -210,6 +210,7 @@ test_goal()
> >  	ensure_write_succ "$fpath" "active_mem_bp" "valid input"
> >  	ensure_write_succ "$fpath" "inactive_mem_bp" "valid input"
> >  	ensure_write_succ "$fpath" "node_eligible_mem_bp" "valid input"
> > +	ensure_write_succ "$fpath" "hugepage_mem_bp" "valid input"
> 
> [Severity: Medium]
> Will this selftest fail when executed?
> 
> Looking at target_metric_store() in mm/damon/sysfs-schemes.c, the kernel
> validation loop returns -EINVAL because "hugepage_mem_bp" is not present in
> the damos_sysfs_qgoal_metric_names array:
> 
> mm/damon/sysfs-schemes.c:target_metric_store() {
> 	...
> 	for (i = 0; i < ARRAY_SIZE(damos_sysfs_qgoal_metric_names); i++) {
> 		struct damos_sysfs_qgoal_metric_name *metric_name;
> 
> 		metric_name = &damos_sysfs_qgoal_metric_names[i];
> 		if (sysfs_streq(buf, metric_name->name)) {
> 			goal->metric = metric_name->metric;
> 			return count;
> 		}
> 	}
> 	return -EINVAL;
> }
> 
> Because the test assumes the write will succeed, the missing kernel
> implementation for this quota goal target metric will cause the write to be
> rejected and trigger a selftest failure.

Implementation of hugepage_mem_bp is not yet in mm-new, but will be merged
before this series.  So, no issue.

> 
> >  	ensure_write_fail "$fpath" "foo" "invalid input"
> >  	ensure_file "$goal_dir/nid" "exist" "600"
> >  	ensure_file "$goal_dir/path" "exist" "600"
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20260728052811.192712-1-sj@kernel.org?part=8


Thanks,
SJ

  reply	other threads:[~2026-07-28  5:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  5:27 [RFC PATCH 00/10] mm/damon: cleanup code, add test cases, and update guidances in docs SJ Park
2026-07-28  5:28 ` [RFC PATCH 01/10] mm/damon/core: use damon_nr_samples_per_aggr() for max merge threshold SJ Park
2026-07-28  5:28 ` [RFC PATCH 02/10] mm/damon/core: remove debug messages SJ Park
2026-07-28  5:28 ` [RFC PATCH 03/10] mm/damon/vaddr: remove a debug message SJ Park
2026-07-28  5:32   ` sashiko-bot
2026-07-28  5:39     ` SJ Park
2026-07-28  5:28 ` [RFC PATCH 04/10] mm/damon/tests/core-kunit: extend set_regions() test for error case SJ Park
2026-07-28  5:28 ` [RFC PATCH 05/10] mm/damon/tests/core-kunit: test <=0 size damon_set_regions() inputs SJ Park
2026-07-28  5:28 ` [RFC PATCH 06/10] mm/damon/tests/core-kunit: test overlapping ranges for set_regions() SJ Park
2026-07-28  5:28 ` [RFC PATCH 07/10] mm/damon/tests/core-kunit: test damon_nr_samples_per_aggr() SJ Park
2026-07-28  5:33   ` sashiko-bot
2026-07-28  5:54     ` SJ Park
2026-07-28  5:28 ` [RFC PATCH 08/10] selftests/damon/sysfs.sh: test hugepage_mem_bp quota goal SJ Park
2026-07-28  5:35   ` sashiko-bot
2026-07-28  5:56     ` SJ Park [this message]
2026-07-28  5:28 ` [RFC PATCH 09/10] Docs/mm/damon/maintainer-profile: update AI review for Sashiko replies SJ Park
2026-07-28  5:28 ` [RFC PATCH 10/10] Docs/ABI/damon: recommend subsystem doc instead of admin-guide 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=20260728055606.211413-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.