From: sashiko-bot@kernel.org
To: "SJ Park" <sj@kernel.org>
Cc: damon@lists.linux.dev
Subject: Re: [RFC PATCH 3/6] mm/damon/core: s/nr_accesses_to_accesses_bp/sample_count_to_bp/
Date: Tue, 07 Jul 2026 04:45:43 +0000 [thread overview]
Message-ID: <20260707044544.42E3D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260707043828.97900-4-sj@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Obsolete divide-by-zero comment and skip logic were not removed in the KUnit test, contradicting the commit message and core code.
--
--- Patch [3]: [RFC PATCH 3/6] mm/damon/core: s/nr_accesses_to_accesses_bp/sample_count_to_bp/ ---
commit aaafc980a7ea0e3c63783a3dbd0d43aab65ff523
Author: SJ Park <sj@kernel.org>
mm/damon/core: s/nr_accesses_to_accesses_bp/sample_count_to_bp/
This commit renames damon_nr_accesses_to_accesses_bp() to
damon_sample_count_to_bp() to better describe its functionality. It also
mentions removing obsolete comments regarding a division-by-zero bug that
was previously fixed.
> diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
> index 0124f83b39b83..86eae3a590354 100644
> --- a/mm/damon/tests/core-kunit.h
> +++ b/mm/damon/tests/core-kunit.h
[ ... ]
> @@ -585,7 +585,7 @@ static void damon_test_nr_accesses_to_accesses_bp(struct kunit *test)
> /*
> * In some cases such as 32bit architectures where UINT_MAX is
> * ULONG_MAX, attrs.aggr_interval becomes zero. Calling
> - * damon_nr_accesses_to_accesses_bp() in the case will cause
> + * damon_sample_count_to_bp() in the case will cause
> * divide-by-zero. Such case is prohibited in normal execution since
> * the caution is documented on the comment for the function, and
> * damon_update_monitoring_results() does the check. Skip the test in
> @@ -594,7 +594,7 @@ static void damon_test_nr_accesses_to_accesses_bp(struct kunit *test)
> if (!attrs.aggr_interval)
> kunit_skip(test, "aggr_interval is zero.");
[Severity: Medium]
The commit message mentions that the obsolete comment about division-by-zero
is removed because damon_nr_samples_per_aggr() now always returns non-zero.
Should this comment and the associated kunit_skip logic also be removed
from damon_test_sample_count_to_bp()?
It appears to still reference the caution comment that was removed from the
core code, and it continues to guard against a divide-by-zero that can no
longer happen.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260707043828.97900-1-sj@kernel.org?part=3
next prev parent reply other threads:[~2026-07-07 4:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 4:38 [RFC PATCH 0/6] mm/damon: update probe hits for runtime parameter commits SJ Park
2026-07-07 4:38 ` [RFC PATCH 1/6] mm/damon/core: s/damon_max_nr_accesses()/damon_nr_samples_per_aggr()/ SJ Park
2026-07-07 4:48 ` sashiko-bot
2026-07-07 5:01 ` SJ Park
2026-07-07 4:38 ` [RFC PATCH 2/6] mm/damon/core: s/accesses_bp_to_nr_accesses/sample_bp_to_count/ SJ Park
2026-07-07 4:49 ` sashiko-bot
2026-07-07 5:02 ` SJ Park
2026-07-07 4:38 ` [RFC PATCH 3/6] mm/damon/core: s/nr_accesses_to_accesses_bp/sample_count_to_bp/ SJ Park
2026-07-07 4:45 ` sashiko-bot [this message]
2026-07-07 5:07 ` SJ Park
2026-07-07 4:38 ` [RFC PATCH 4/6] mm/damon/core: s/nr_accesses_for_new_attrs/nr_samples_for_new_attrs/ SJ Park
2026-07-07 4:50 ` sashiko-bot
2026-07-07 5:08 ` SJ Park
2026-07-07 4:38 ` [RFC PATCH 5/6] mm/damon/core: update probe hits for new parameter commit SJ Park
2026-07-07 4:51 ` sashiko-bot
2026-07-07 5:09 ` SJ Park
2026-07-07 4:38 ` [RFC PATCH 6/6] mm/damon/core: handle unreset probe_hits in probe_hits_mvsum() 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=20260707044544.42E3D1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=damon@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sj@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