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: [PATCH 1/7] mm/damon/core: remove comment and test for nr_to_bp() divide-by-zero
Date: Wed,  8 Jul 2026 07:25:56 -0700	[thread overview]
Message-ID: <20260708142558.123894-1-sj@kernel.org> (raw)
In-Reply-To: <20260708141335.C33741F000E9@smtp.kernel.org>

On Wed, 08 Jul 2026 14:13:35 +0000 sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The commit message incorrectly references `damon_nr_samples_per_aggr()` instead of `damon_max_nr_accesses()`.
> --
> 
> --- Patch [1]: [PATCH 1/7] mm/damon/core: remove comment and test for nr_to_bp() divide-by-zero ---
> commit f8fbcab0a03e83756cdeec775b4f0bc25f753341
> Author: SJ Park <sj@kernel.org>
> 
> mm/damon/core: remove comment and test for nr_to_bp() divide-by-zero
> 
> This commit removes an obsolete comment on damon_nr_accesses_to_accesses_bp()
> and its associated kunit test. Previous changes guarantee that the interval
> calculations will not result in a division-by-zero.
> 
> > The comments on damon_nr_accesses_to_accesses_bp() and its unit test
> > warn it can trigger division-by-zero when the aggregation interval is
> > zero.  Commit 35d4a3cf70a8 ("mm/damon/ops-common: handle extreme
> > intervals in damon_hot_score()") modified damon_nr_samples_per_aggr() to
> > always return non-zero.  Hence no division-by-zero of the note can
> > happen.
> 
> [Severity: Medium]
> This isn't a bug, but is the function name referenced in the commit
> message accurate?
> 
> The commit message states that commit 35d4a3cf70a8 modified
> damon_nr_samples_per_aggr() to always return non-zero. However, the function
> that was modified and used to calculate maximum accesses is
> damon_max_nr_accesses().
> 
> Could this description be updated to reference damon_max_nr_accesses() to
> prevent confusion for future code archaeology and maintenance?

Good finding.  I will ask Andrew to fix when he picks this up, unless I find
more issues that deserve v2 of this series.

> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20260708135359.122587-1-sj@kernel.org?part=1


Thanks,
SJ

  reply	other threads:[~2026-07-08 14:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 13:53 [PATCH 0/7] mm/damon: update probe hits for runtime parameter commits SJ Park
2026-07-08 13:53 ` [PATCH 1/7] mm/damon/core: remove comment and test for nr_to_bp() divide-by-zero SJ Park
2026-07-08 14:13   ` sashiko-bot
2026-07-08 14:25     ` SJ Park [this message]
2026-07-08 14:31   ` SJ Park
2026-07-08 13:53 ` [PATCH 2/7] mm/damon/core: s/damon_max_nr_accesses()/damon_nr_samples_per_aggr()/ SJ Park
2026-07-08 13:53 ` [PATCH 3/7] mm/damon/core: s/accesses_bp_to_nr_accesses/sample_bp_to_count/ SJ Park
2026-07-08 13:53 ` [PATCH 4/7] mm/damon/core: s/nr_accesses_to_accesses_bp/sample_count_to_bp/ SJ Park
2026-07-08 14:03   ` sashiko-bot
2026-07-08 14:26     ` SJ Park
2026-07-08 13:53 ` [PATCH 5/7] mm/damon/core: s/nr_accesses_for_new_attrs/nr_samples_for_new_attrs/ SJ Park
2026-07-08 14:09   ` sashiko-bot
2026-07-08 14:27     ` SJ Park
2026-07-08 13:53 ` [PATCH 6/7] mm/damon/core: update probe hits for new parameter commit SJ Park
2026-07-08 14:08   ` sashiko-bot
2026-07-08 14:28     ` SJ Park
2026-07-08 13:53 ` [PATCH 7/7] mm/damon/core: handle unreset probe_hits in probe_hits_mvsum() SJ Park
2026-07-08 14:34 ` [PATCH 0/7] mm/damon: update probe hits for runtime parameter commits 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=20260708142558.123894-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